feat: overhaul userspace heap and virtual memory
This commit is contained in:
+16
-1
@@ -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).
|
||||
|
||||
Reference in New Issue
Block a user