feature: kfree_alloc is now working (uncomment a free in the main to prove)

This commit is contained in:
2024-09-19 17:39:14 +02:00
parent 5ebf8ac6ab
commit 4cc1dba5f9
3 changed files with 46 additions and 7 deletions

View File

@ -25,7 +25,24 @@ void kernel_main(void)
terminal_initialize();
init_gdt();
init_memory();
char *str = (char *)kalloc_frame(1);
char *str = kalloc_frame(104831);
str = kalloc_frame(104831);
str = kalloc_frame(104831);
str = kalloc_frame(104831);
str = kalloc_frame(104831);
str = kalloc_frame(104831);
str = kalloc_frame(104831);
str = kalloc_frame(104831);
str = kalloc_frame(104831);
str = kalloc_frame(104831);
kfree_frame(str, 104831);
str = kalloc_frame(104831);
kfree_frame(str, 104831);
str = kalloc_frame(104831);
kfree_frame(str, 104831);
str = kalloc_frame(104831);
kfree_frame(str, 104831);
str = kalloc_frame(104831);
memcpy(str, "Hello world!\n", 15);
kprintf(KERN_INFO, "%d: %s", str, str);
shell_init();