feature: both physical and virtual allocators should be done

This commit is contained in:
2024-09-26 16:18:06 +02:00
parent 9ade568a64
commit a66f9174f4
19 changed files with 571 additions and 62 deletions

View File

@ -1,7 +1,16 @@
#include "alloc.h"
#include "kprintf.h"
#include "string.h"
void heap_cmd(char *arg)
{
(void)arg;
show_alloc_mem();
}
if (!arg)
kprintf(KERN_INFO "You must specify an argument (phys/virt)\n");
else if (!strcmp(arg, "phys"))
show_kalloc_mem();
else if (!strcmp(arg, "virt"))
show_valloc_mem();
else
kprintf(KERN_INFO "%s: invalid argument to heap (phys/virt)\n",
arg);
}