/*
- * Copyright 2014 Facebook, Inc.
+ * Copyright 2013-present Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* limitations under the License.
*/
-#ifndef FOLLY_IO_TYPEDIOBUF_H_
-#define FOLLY_IO_TYPEDIOBUF_H_
+#pragma once
#include <algorithm>
#include <iterator>
#include <type_traits>
-#include "folly/Malloc.h"
-#include "folly/io/IOBuf.h"
+#include <folly/io/IOBuf.h>
+#include <folly/memory/Malloc.h>
namespace folly {
void push(IT begin, IT end) {
uint32_t n = std::distance(begin, end);
if (usingJEMalloc()) {
- // Rely on rallocm() and avoid exponential growth to limit
+ // Rely on xallocx() and avoid exponential growth to limit
// amount of memory wasted.
reserve(headroom(), n);
} else if (tailroom() < n) {
IOBuf* buf_;
};
-} // namespace folly
-
-#endif /* FOLLY_IO_TYPEDIOBUF_H_ */
-
+} // namespace folly