Implemented a proper libc

This commit is contained in:
2024-10-05 13:34:24 +02:00
parent a6445ebcb6
commit 5a5ea4ea59
28 changed files with 258 additions and 123 deletions
+12
View File
@@ -0,0 +1,12 @@
#include <stdint.h>
#include <syscall.h>
#include <stdlib.h>
void* malloc(const uint32_t size) {
return (void*)syscall(SYS_MALLOC, size, 0, 0);
}
void free(const void* ptr) {
syscall(SYS_FREE, (int)ptr, 0, 0);
}