POK(kernelpart)
|
Go to the source code of this file.
Defines | |
#define | MEM_16MB 0x1000000 |
Functions | |
int | pok_pm_init () |
uint32_t | pok_pm_sbrk (uint32_t increment) |
int pok_pm_init | ( | ) |
Definition at line 44 of file pm.c.
{ pok_multiboot_info_t* mbi; uint32_t free_mem; mbi = (pok_multiboot_info_t*) pok_multiboot_info; #ifdef POK_NEEDS_DMA free_mem = MEM_16MB; #else free_mem = ALIGN_UP (4096, (uint32_t)(&__pok_end)); #endif pok_x86_pm_heap_start = pok_x86_pm_brk = free_mem; pok_x86_pm_heap_end = (uint32_t)(mbi->mem_upper * 1024); return (POK_ERRNO_OK); }
uint32_t pok_pm_sbrk | ( | uint32_t | increment | ) |
Allocation function, very basic, just allocate new memory space each time
Definition at line 68 of file pm.c.
{ uint32_t addr; addr = pok_x86_pm_brk; pok_x86_pm_brk += increment; return (addr); }