2 * Kernel memory allocation functions
4 * In this default file they are just exec functions. However you may
5 * reimplement them for a system with memory protection.
7 * void *krnAllocMem(unsigned int len);
8 * void krnFreeMem(void *addr, unsigned int len);
11 #include <exec/memory.h>
12 #include <proto/exec.h>
15 * 'access' parameter in krnAllocMem() is reserved to provide
16 * user-mode access flags. In supervisor mode we assume to always
17 * have RW access to the allocated memory. Also, current code assumes
18 * krnAllocMem() will clear the memory (at least KrnCreateContext()
19 * implementations and kernel.resource init code). Perhaps this is not good.
22 #define krnAllocMem(len, access) AllocMem(len, MEMF_PUBLIC|MEMF_CLEAR)
23 #define krnFreeMem(addr, len) FreeMem(addr, len)