Functions | |
status_t | AllocateHeapMem (MemHeader_s *psHeader, uint32 *pnAddress, bool bExactAddress, bool bHighest, uint32 nSize) |
Allocates memory for a new memory heap. | |
status_t | FreeHeapMem (MemHeader_s *psHeader, uint32 nAddress) |
Frees memory from the specified memory heap. | |
void | init_pages (uint32 nFirstUsablePage) |
Initializes the structures necessary for allocating pages. |
status_t AllocateHeapMem | ( | MemHeader_s * | psHeader, | |
uint32 * | pnAddress, | |||
bool | bExactAddress, | |||
bool | bHighest, | |||
uint32 | nSize | |||
) |
Allocates memory for a new memory heap.
For internal use only.
psHeader | the memory pool to use. | |
pnAddress | a pointer to the address of the memory to use; only used if bExactAddress is true. Will be set to the real address if the call is successful. | |
bExactAddress | true to use pnAddress. | |
bHighest | if true then the memory at the highest address will be returned. | |
nSize | the size in bytes to allocate. |
0
if successful. status_t FreeHeapMem | ( | MemHeader_s * | psHeader, | |
uint32 | nAddress | |||
) |
Frees memory from the specified memory heap.
For internal use only.
psHeader | the memory pool to use. | |
nAddress | the address of the memory to free. |
0
if successful. void init_pages | ( | uint32 | nFirstUsablePage | ) |
Initializes the structures necessary for allocating pages.
Called by init_kernel() (init.c).
For internal use only.
nFirstUsablePage | - The address of the first usable page. This parameter is set to the end of the kernel image. |