[MEMORY] Very simple malloc implementation for kernel

This commit is contained in:
thomas committed 2017-03-27 23:09:08 +02:00
1 parent 4bf5835dc4
commit deb1f031ce
3 files changed
+185

No files matched your search

+13
View File
@@ -19,6 +19,19 @@ int kmain(uint64_t multiboot_magic, void *multiboot_data)
extern void *BootGDT;
vmm_set_page(0, V2P(&BootGDT), V2P(&BootGDT), PAGE_PRESENT);
void *a = kmalloc(0x400);
void *b = kmalloc(0x200);
void *c = kmalloc(0x100);
kfree(b);
void *d = kmalloc(0x100);
(void)a;
(void)b;
(void)c;
(void)d;
heap_print();
debug_info("BOOT COMPLETE\n");
for(;;)asm("hlt");
}