34 void *
Alloc(
int nSize,
int nUnused);
44 void Free(
void *pBlock,
int nSize);
FixedSizeAlloc()
Construct an allocator with no stores yet.
void * Alloc(int nSize, int nUnused)
Hand out a block from the store of its size, creating the store on first use.
static int StoreNodeWords(int nIndex)
Report the node size of a store.
static int StoreIndex(int nSize)
Report the store a size of block takes.
void Free(void *pBlock, int nSize)
Return a block to the store of its size.
void Report(PrnStream &stream)
Write the use of each store and the bytes their free nodes take.
static constexpr int kNumStores
The node sizes, one for each 16 bytes.
Definition fixedsizealloc.h:15
Free list of nodes of one size, grown a chunk of nodes at a time from the hunks of the pool.
Definition freestore.h:14
Text output stream.
Definition prnstream.h:16