mem/virtual: specify max protection on mmap call in NetBSD and FreeBSD

This commit is contained in:
Laytan Laats
2025-02-18 18:33:19 +01:00
parent ae0f69fbe2
commit cae3f13d9f
6 changed files with 99 additions and 24 deletions
+3 -1
View File
@@ -15,7 +15,9 @@ platform_memory_alloc :: proc "contextless" (to_commit, to_reserve: uint) -> (bl
to_commit = clamp(to_commit, size_of(Platform_Memory_Block), total_to_reserved)
data := reserve(total_to_reserved) or_return
commit(raw_data(data), to_commit)
commit_err := commit(raw_data(data), to_commit)
assert_contextless(commit_err == nil)
block = (^Platform_Memory_Block)(raw_data(data))
block.committed = to_commit