proxygen
folly::IOBuf::SharedInfo Struct Reference

Public Member Functions

 SharedInfo ()
 
 SharedInfo (FreeFunction fn, void *arg)
 

Public Attributes

FreeFunction freeFn
 
void * userData
 
std::atomic< uint32_trefcount
 
bool externallyShared {false}
 

Detailed Description

Definition at line 1347 of file IOBuf.h.

Constructor & Destructor Documentation

folly::IOBuf::SharedInfo::SharedInfo ( )

Definition at line 120 of file IOBuf.cpp.

References refcount.

120  : freeFn(nullptr), userData(nullptr) {
121  // Use relaxed memory ordering here. Since we are creating a new SharedInfo,
122  // no other threads should be referring to it yet.
123  refcount.store(1, std::memory_order_relaxed);
124 }
FreeFunction freeFn
Definition: IOBuf.h:1353
std::atomic< uint32_t > refcount
Definition: IOBuf.h:1355
folly::IOBuf::SharedInfo::SharedInfo ( FreeFunction  fn,
void *  arg 
)

Definition at line 126 of file IOBuf.cpp.

References refcount.

127  : freeFn(fn), userData(arg) {
128  // Use relaxed memory ordering here. Since we are creating a new SharedInfo,
129  // no other threads should be referring to it yet.
130  refcount.store(1, std::memory_order_relaxed);
131 }
FreeFunction freeFn
Definition: IOBuf.h:1353
std::atomic< uint32_t > refcount
Definition: IOBuf.h:1355

Member Data Documentation

bool folly::IOBuf::SharedInfo::externallyShared {false}

Definition at line 1356 of file IOBuf.h.

Referenced by folly::IOBuf::markExternallySharedOne().

FreeFunction folly::IOBuf::SharedInfo::freeFn

Definition at line 1353 of file IOBuf.h.

Referenced by folly::IOBuf::freeExtBuffer(), and folly::IOBuf::reserveSlow().

std::atomic<uint32_t> folly::IOBuf::SharedInfo::refcount

Definition at line 1355 of file IOBuf.h.

Referenced by folly::IOBuf::decrementRefcount(), and SharedInfo().

void* folly::IOBuf::SharedInfo::userData

Definition at line 1354 of file IOBuf.h.

Referenced by folly::IOBuf::freeExtBuffer(), and folly::IOBuf::freeInternalBuf().


The documentation for this struct was generated from the following files: