feature: kmalloc kfree and krealloc are good

This commit is contained in:
2024-09-21 12:17:27 +02:00
parent 0467c45bf0
commit 943f2beab9
15 changed files with 607 additions and 23 deletions

View File

@ -1,3 +1,4 @@
#include "alloc.h"
#include "gdt.h"
#include "kprintf.h"
#include "memory.h"
@ -31,5 +32,11 @@ void kernel_main(void)
kprintf(KERN_NOTICE "KERN_NOTICE\n");
kprintf(KERN_INFO "KERN_INFO\n");
kprintf(KERN_DEBUG "KERN_DEBUG\n");
char *str = kalloc(10);
kfree(str);
str = kalloc(10);
show_alloc_mem();
strcpy(str, "Hello world\n");
kprintf("%s", str);
shell_init();
}