allocator interface (first pass)

This commit is contained in:
2026-07-06 21:24:49 +02:00
parent 7ce3917c15
commit 95c61311ca
24 changed files with 833 additions and 161 deletions
+6 -3
View File
@@ -1,6 +1,9 @@
malloc c_func(size usize) ?*mut u8
free c_func(ptr ?*mut u8) void
mem :: import ".."
alloc func(size usize) ?*mut u8 {
return malloc(size)
return mem.alloc(mem.heap, size, 1)
}
free func(memory ?*mut u8) void {
mem.free(mem.heap, memory, 0, 1)
}