Deletes a virtual memory object.
#include <sys/types.h>
#include <sys/errno.h>
#include <sys/vmuser.h>
int vms_delete ( vmid)
vmid_t vmid;
Item | Description |
---|---|
vmid | Specifies the ID of the virtual memory object to be deleted. |
The vms_delete kernel service deallocates the temporary resources held by the virtual memory object specified by the vmid parameter and then frees the control block. This delete operation can complete asynchronously, but the caller receives a synchronous return code indicating success or failure.
Releasing Resources
The completion of the delete operation can be delayed if paging I/O is still occurring for pages attached to the object. All page frames not in the I/O state are released.
If there are page frames in the I/O state, they are marked for discard at I/O completion and the virtual memory object is placed in the iodelete state. When an I/O completion occurs for the last page attached to a virtual memory object in the iodelete state, the virtual memory object is placed on the free list.
The vms_delete kernel service can be called from the process environment only.
Item | Description |
---|---|
0 | Indicates a successful operation. |
EINVAL | Indicates that the vmid parameter is not valid. |