Merge pull request #2933 from flga/master

sys/linux: munmap was not using the correct syscall
This commit is contained in:
Jeroen van Rijn
2023-11-08 00:37:32 +01:00
committed by GitHub

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)
}