projects
/
folly.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add zlib/gzip streaming support
[folly.git]
/
folly
/
io
/
TypedIOBuf.h
diff --git
a/folly/io/TypedIOBuf.h
b/folly/io/TypedIOBuf.h
index c5ecfc484837502d1c8ec6536e9882c15cc0800e..9358cd4dfa61b34d1749339ca05fc487eba23f33 100644
(file)
--- a/
folly/io/TypedIOBuf.h
+++ b/
folly/io/TypedIOBuf.h
@@
-1,5
+1,5
@@
/*
/*
- * Copyright 201
4
Facebook, Inc.
+ * Copyright 201
7
Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-14,15
+14,14
@@
* limitations under 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 <algorithm>
#include <iterator>
#include <type_traits>
-#include
"folly/Malloc.h"
-#include
"folly/io/IOBuf.h"
+#include
<folly/Malloc.h>
+#include
<folly/io/IOBuf.h>
namespace folly {
namespace folly {
@@
-173,7
+172,7
@@
class TypedIOBuf {
void push(IT begin, IT end) {
uint32_t n = std::distance(begin, end);
if (usingJEMalloc()) {
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) {
// amount of memory wasted.
reserve(headroom(), n);
} else if (tailroom() < n) {
@@
-214,6
+213,3
@@
class TypedIOBuf {
};
} // namespace folly
};
} // namespace folly
-
-#endif /* FOLLY_IO_TYPEDIOBUF_H_ */
-