sys/linux: munmap was not using the correct syscall

This commit is contained in:
flga
2023-11-07 23:19:14 +00:00
parent 639cc9faa8
commit 4266a7c166

View File

@@ -161,7 +161,7 @@ mprotect :: proc "contextless" (addr: rawptr, size: uint, prot: Mem_Protection)
/// Unmap memory
/// Available since Linux 1.0
munmap :: proc "contextless" (addr: rawptr, size: uint) -> (Errno) {
ret := syscall(SYS_mmap, addr, size)
ret := syscall(SYS_munmap, addr, size)
return Errno(-ret)
}