#include #include #include #include #include "cpu/arch_consts.h" #define KMALLOC_BMAP_SZ (((KMALLOC_SZ*1024)/4)/8) static char bitmap[KMALLOC_BMAP_SZ]; static void* data=(void*)KMALLOC_START; static char get_bmap_bit(uint32_t index) { uint32_t byte=index/8; uint32_t bit=index%8; char entry=bitmap[byte]; return (entry&(1<0; } static void set_bmap_bit(uint32_t index) { uint32_t byte=index/8; uint32_t bit=index%8; bitmap[byte]=bitmap[byte]|(1<