MAJOR RESTRUCTURE

This commit is contained in:
2024-12-28 21:23:58 +01:00
parent 12b07a9f70
commit 2e0b030324
81 changed files with 1168 additions and 579 deletions
+18
View File
@@ -0,0 +1,18 @@
#include <syscalls/syscalls.h>
#include <memory/malloc.h>
#include <cpu/isr.h>
#include <stddef.h>
int sys_malloc(intFrame_t* iframe) {
size_t count = iframe->ebx;
// First Malloc()
if (!mallocListHead) {
mallocInit(count); // Setup malloc linked list
}
void* ptr = mallocNextNode(count);
mallocMergeFree();
return (size_t)ptr;
}