Munmap
Removes a virtual-memory mapping.
Module: Linux
Signature
rux
func Munmap(addr: *opaque, length: uint) -> int64;Parameters
| Name | Type | Description |
|---|---|---|
addr | *opaque | Page-aligned start of the range to unmap. |
length | uint | Number of bytes in the range. |
Returns
int64 — 0 on success, or a negative errno result on failure.
Description
After a successful call, accessing the unmapped range is invalid. The address must be page-aligned; Linux rounds length up to a page boundary.
Example
rux
import Linux::{ IsError, Munmap };
if IsError(Munmap(memory, 4096u)) {
return 1i32;
}See also
Mmap— create a mapping