36 void Init(
const char *name,
int num,
int *
start,
int sizeWords,
bool flag);
68 void *
Alloc(
int sizeWords,
const char *name,
int alignBits,
int *allocatedWords);
Free block of a Heap, a node of the heap's free list in address order.
Definition heap.h:10
Region of memory that hands out word-aligned blocks from a free list, best fit first.
Definition heap.h:38
void FindNeighbors(void *pAddress, FreeBlock **ppPrev, FreeBlock **ppNext)
Find the free blocks on each side of an address.
bool Free(void *mem)
Return an allocation to the free list, merging it with its neighbours.
void Init(const char *name, int num, int *start, int sizeWords, bool flag)
Take over a region of memory as one free run.
void Resize(int sizeWords)
Grow or shrink the heap by moving its end.
void InsertFreeBlock(FreeBlock *pBlock, int nSizeWords, FreeBlock *pPrev, FreeBlock *pNext)
Make a free block of a region and link it between two free blocks.
const char * Name() const
Report the heap's name.
Definition Heap.h:112
int SizeWords() const
Report the size of the heap.
Definition Heap.h:103
int * Start() const
Report the first word of the heap.
Definition Heap.h:94
void * Alloc(int sizeWords, const char *name, int alignBits, int *allocatedWords)
Allocate from the smallest free run that fits.
void FreeBlockStats(int *numBlocks, int *freeBytes, int *biggestBlock)
Report the free runs.
void Print(PrnStream &stream, bool summary)
Print every run of the heap.
Text output stream.
Definition prnstream.h:16
int start(int argc, char **argv)
The Conexant USB modem driver registers with usbd and drives each matching modem for the modem librar...