Struct MemHeader
MemHeader
struct MemHeader
;
A MemHeader is placed at the start of a managed memory space. The memory after the header is managed with a list of free memory chunks. When all memory is allocated the list is empty.
Methods
Name | Description |
---|---|
allocate
(byteSize, flags)
|
Allocate -- Allocate from a MemHeader managed memory |
allocateAbs
(byteSize, location, flags)
|
allocateAbs -- Allocate absolute or aligned memory chunk from MemHeader managed memory |
allocateAligned
(byteSize, alignment, flags)
|
Allocate aligned memory (2^n) |
deallocate
(memoryBlock, byteSize)
|
deallocate -- return memory back to the MemHeader pool |
initMemHeader
(size, attributes, pri, membase, name)
|
initMemHeader -- Init a memheader structure |
Inner structs
Name | Description |
---|---|
MemChunk
|
MemChunk - The node of a free mem segment |