2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
7 * Boot-time memory management functions.
8 * In fact this is just a placeholder. All this can be seriously improved.
13 #include "kernel_bootmem.h"
14 #include "kernel_intern.h"
16 void *krnAllocBootMem(unsigned int size
)
18 return krnAllocBootMemAligned(size
, sizeof(void *));
21 void *krnAllocBootMemAligned(unsigned int size
, unsigned int align
)
23 void *addr
= (void *)AROS_ROUNDUP2(__BootData
->bd_BootMem
, align
);
25 __BootData
->bd_BootMem
= addr
+ size
;
26 /* Clear the allocated memory. In many places we expect it. */
27 memset(addr
, 0, size
);