POK(kernelpart)
pm.h File Reference

Go to the source code of this file.

Macros

#define MEM_16MB   0x1000000

Functions

int pok_pm_init ()
uint32_t pok_pm_sbrk (uint32_t increment)

Macro Definition Documentation

#define MEM_16MB   0x1000000

Definition at line 21 of file pm.h.


Function Documentation

int pok_pm_init ( )

Definition at line 44 of file pm.c.

{
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
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;
pok_x86_pm_brk += increment;
return (addr);
}