allocpages.c

pdclib interface to the kernel’s memory management functions

Author

Marcel Sondaar

License

Public Domain

Summary
allocpages.cpdclib interface to the kernel’s memory management functions
Variables
_PDCLIB_heaptopcontains the current top-of-heap
_PDCLIB_actualtopcontains the current top of actually allocated memory
Functions
_PDCLIB_allocpagesAllocate or deallocate pages from the heap

Variables

_PDCLIB_heaptop

char * _PDCLIB_heaptop

contains the current top-of-heap

_PDCLIB_actualtop

char * _PDCLIB_actualtop

contains the current top of actually allocated memory

Functions

_PDCLIB_allocpages

void * _PDCLIB_allocpages(int n)

Allocate or deallocate pages from the heap

in

  • n = amount of blocks of _PDCLIB_PAGESIZE to allocate

out

  • return = original end-of-heap
char * _PDCLIB_heaptop
contains the current top-of-heap
char * _PDCLIB_actualtop
contains the current top of actually allocated memory
void * _PDCLIB_allocpages(int n)
Allocate or deallocate pages from the heap