Releases virtual memory resources for the specified address range.
The vm_release kernel service releases pages that intersect the specified address range from the vaddr parameter to the vaddr parameter plus the number of bytes specified by the nbytes parameter. The value in the nbytes parameter must be nonnegative and the caller must have write access to the pages specified by the address range.
Each page that intersects the byte range is logically reset to 0, and any page frame is discarded. A page frame in I/O state is marked for discard at I/O completion. That is, the page frame is placed on the free list when the I/O operation completes.
Item | Description |
---|---|
vaddr | Specifies the address of the first byte in the address range to be released. |
nbytes | Specifies the number of bytes to be released. |
The vm_release kernel service can be called from the process environment only.
Item | Description |
---|---|
0 | Indicates successful completion. |
EACCES | Indicates that the caller does not have write access to the specified pages. |
EINVAL | Indicates one of the following errors:
|