mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-28 10:20:05 +00:00
mem/virtual: specify max protection on mmap call in NetBSD and FreeBSD
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user