a page-aligned BufBuilder.
More...
#include <aligned_builder.h>
a page-aligned BufBuilder.
◆ AlignedBuilder()
mongo::AlignedBuilder::AlignedBuilder |
( |
unsigned |
init_size | ) |
|
◆ ~AlignedBuilder()
mongo::AlignedBuilder::~AlignedBuilder |
( |
| ) |
|
|
inline |
◆ _free()
void mongo::AlignedBuilder::_free |
( |
void * |
p | ) |
|
|
private |
◆ _malloc()
void mongo::AlignedBuilder::_malloc |
( |
unsigned |
sz | ) |
|
|
private |
◆ _realloc()
void mongo::AlignedBuilder::_realloc |
( |
unsigned |
newSize, |
|
|
unsigned |
oldLenInUse |
|
) |
| |
|
private |
◆ appendBuf()
void mongo::AlignedBuilder::appendBuf |
( |
const void * |
src, |
|
|
size_t |
len |
|
) |
| |
|
inline |
◆ appendChar()
void mongo::AlignedBuilder::appendChar |
( |
char |
j | ) |
|
|
inline |
◆ appendNum() [1/8]
void mongo::AlignedBuilder::appendNum |
( |
char |
j | ) |
|
|
inline |
◆ appendNum() [2/8]
void mongo::AlignedBuilder::appendNum |
( |
short |
j | ) |
|
|
inline |
◆ appendNum() [3/8]
void mongo::AlignedBuilder::appendNum |
( |
int |
j | ) |
|
|
inline |
◆ appendNum() [4/8]
void mongo::AlignedBuilder::appendNum |
( |
unsigned |
j | ) |
|
|
inline |
◆ appendNum() [5/8]
void mongo::AlignedBuilder::appendNum |
( |
bool |
j | ) |
|
|
inline |
◆ appendNum() [6/8]
void mongo::AlignedBuilder::appendNum |
( |
double |
j | ) |
|
|
inline |
◆ appendNum() [7/8]
void mongo::AlignedBuilder::appendNum |
( |
long long |
j | ) |
|
|
inline |
◆ appendNum() [8/8]
void mongo::AlignedBuilder::appendNum |
( |
unsigned long long |
j | ) |
|
|
inline |
◆ appendStr()
void mongo::AlignedBuilder::appendStr |
( |
StringData |
str, |
|
|
bool |
includeEOO = true |
|
) |
| |
|
inline |
◆ appendStruct()
template<class T >
void mongo::AlignedBuilder::appendStruct |
( |
const T & |
s | ) |
|
|
inline |
◆ atOfs()
char* mongo::AlignedBuilder::atOfs |
( |
unsigned |
ofs | ) |
|
|
inline |
if buffer grows pointer no longer valid
◆ buf()
const char* mongo::AlignedBuilder::buf |
( |
| ) |
const |
|
inline |
note this may be deallocated (realloced) if you keep writing or reset().
◆ cur()
char* mongo::AlignedBuilder::cur |
( |
| ) |
|
|
inline |
if buffer grows pointer no longer valid
◆ grow()
char* mongo::AlignedBuilder::grow |
( |
unsigned |
by | ) |
|
|
inlineprivate |
returns the pre-grow write position
◆ growReallocate()
void NOINLINE_DECL mongo::AlignedBuilder::growReallocate |
( |
unsigned |
oldLenInUse | ) |
|
|
private |
◆ kill()
void mongo::AlignedBuilder::kill |
( |
| ) |
|
|
private |
◆ len()
unsigned mongo::AlignedBuilder::len |
( |
| ) |
const |
|
inline |
◆ mallocSelfAligned()
void mongo::AlignedBuilder::mallocSelfAligned |
( |
unsigned |
sz | ) |
|
|
private |
◆ reset() [1/2]
void mongo::AlignedBuilder::reset |
( |
unsigned |
sz | ) |
|
reset with a hint as to the upcoming needed size specified
◆ reset() [2/2]
void mongo::AlignedBuilder::reset |
( |
| ) |
|
reset for a re-use.
shrinks if > 128MB
◆ skip()
size_t mongo::AlignedBuilder::skip |
( |
unsigned |
n | ) |
|
|
inline |
leave room for some stuff later
- Returns
- offset in the buffer that was our current position
◆ _len
unsigned mongo::AlignedBuilder::_len |
|
private |
◆ _p
◆ Alignment
const unsigned mongo::AlignedBuilder::Alignment = 8192 |
|
staticprivate |
The documentation for this class was generated from the following files:
- /home/louis/git/mongodbsource.github.io/src/src/mongo/db/storage/mmap_v1/aligned_builder.h
- /home/louis/git/mongodbsource.github.io/src/src/mongo/db/storage/mmap_v1/aligned_builder.cpp