feat: overhaul userspace heap and virtual memory

This commit is contained in:
2026-08-10 12:25:27 +02:00
parent 4ecec32c5c
commit 9b23d99082
21 changed files with 905 additions and 451 deletions
+16 -1
View File
@@ -185,9 +185,24 @@
void* montauk::alloc(uint64_t size);
.B SYS_FREE (12)
Reserved (currently a no-op).
Release a complete mapping previously returned by SYS_ALLOC.
void montauk::free(void* ptr);
.B SYS_MMAP_ANON (168)
Reserve a zero-filled anonymous mapping with read/write/execute
protection flags. Pages are committed on first access. Writable
executable mappings are rejected.
void* mmap(void*, size_t, int, int, int, long);
.B SYS_MUNMAP (169)
Release a page-aligned range. Partial unmap splits the VM area and
makes the virtual range reusable.
int munmap(void* addr, size_t length);
.B SYS_MPROTECT (170)
Change read/write/execute permissions on an anonymous mapping.
int mprotect(void* addr, size_t length, int prot);
.B SYS_MEMSTATS (67)
Get kernel-wide physical memory usage (total/free/used bytes,
page size).