#include "cpu/arch_consts.h" #include #include #include #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(size_t index) { size_t byte=index/8; size_t bit=index%8; char entry=bitmap[byte]; return (entry&(1<0; } static void set_bmap_bit(size_t index) { size_t byte=index/8; size_t bit=index%8; bitmap[byte]=bitmap[byte]|(1<