Pyro Private Functions
Functions
Pyro Internal Functions: Memory

Functions

status_t AllocateHeapMem (MemHeader_s *psHeader, uint32 *pnAddress, bool bExactAddress, bool bHighest, uint32 nSize)
 Allocates memory for a new memory heap. More...
 
status_t FreeHeapMem (MemHeader_s *psHeader, uint32 nAddress)
 Frees memory from the specified memory heap. More...
 
void init_pages (uint32 nFirstUsablePage)
 Initializes the structures necessary for allocating pages. More...
 

Detailed Description

Function Documentation

status_t AllocateHeapMem ( MemHeader_s psHeader,
uint32 *  pnAddress,
bool  bExactAddress,
bool  bHighest,
uint32  nSize 
)

Allocates memory for a new memory heap.

Parameters
psHeaderthe memory pool to use.
pnAddressa 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.
bExactAddresstrue to use pnAddress.
bHighestif true then the memory at the highest address will be returned.
nSizethe size in bytes to allocate.
Returns
0 if successful.
See Also
FreeHeapMem()
Author
Arno Klenke (arno_.nosp@m.klen.nosp@m.ke@ya.nosp@m.hoo..nosp@m.de)
status_t FreeHeapMem ( MemHeader_s psHeader,
uint32  nAddress 
)

Frees memory from the specified memory heap.

Parameters
psHeaderthe memory pool to use.
nAddressthe address of the memory to free.
Returns
0 if successful.
See Also
AllocateHeapMem()
Author
Arno Klenke (arno_.nosp@m.klen.nosp@m.ke@ya.nosp@m.hoo..nosp@m.de)
void init_pages ( uint32  nFirstUsablePage)

Initializes the structures necessary for allocating pages.

Called by init_kernel() (init.c).

Parameters
nFirstUsablePage- The address of the first usable page. This parameter is set to the end of the kernel image.
Author
Kurt Skauen (kurt@.nosp@m.athe.nosp@m.os.cx)