proxygen
IOBuf.cpp File Reference
#include <folly/io/IOBuf.h>
#include <cassert>
#include <cstdint>
#include <cstdlib>
#include <stdexcept>
#include <folly/Conv.h>
#include <folly/Likely.h>
#include <folly/Memory.h>
#include <folly/ScopeGuard.h>
#include <folly/hash/SpookyHashV2.h>
#include <folly/io/Cursor.h>
#include <folly/lang/Align.h>
#include <folly/memory/Malloc.h>

Go to the source code of this file.

Classes

struct  folly::IOBuf::HeapPrefix
 
struct  folly::IOBuf::HeapStorage
 
struct  folly::IOBuf::HeapFullStorage
 

Namespaces

 folly
 —— Concurrent Priority Queue Implementation ——
 

Macros

#define __STDC_LIMIT_MACROS
 

Enumerations

enum  : uint16_t
 
enum  : std::size_t
 

Macro Definition Documentation

#define __STDC_LIMIT_MACROS

Definition at line 18 of file IOBuf.cpp.

Enumeration Type Documentation

anonymous enum : uint16_t

Definition at line 41 of file IOBuf.cpp.

41  : uint16_t {
42  kHeapMagic = 0xa5a5,
43  // This memory segment contains an IOBuf that is still in use
44  kIOBufInUse = 0x01,
45  // This memory segment contains buffer data that is still in use
46  kDataInUse = 0x02,
47 };
anonymous enum : std::size_t

Definition at line 49 of file IOBuf.cpp.

49  : std::size_t {
50  // When create() is called for buffers less than kDefaultCombinedBufSize,
51  // we allocate a single combined memory segment for the IOBuf and the data
52  // together. See the comments for createCombined()/createSeparate() for more
53  // details.
54  //
55  // (The size of 1k is largely just a guess here. We could could probably do
56  // benchmarks of real applications to see if adjusting this number makes a
57  // difference. Callers that know their exact use case can also explicitly
58  // call createCombined() or createSeparate().)
59  kDefaultCombinedBufSize = 1024
60 };