Sets the page protection key for a page range.
The vm_protectp kernel service is called to set the storage protect key for a given page range. The key parameter specifies the value to which the page protection key is set. The protection key is set for all pages touched by the specified page range that are resident in memory. The vm_protectp kernel service applies only to client storage.
If a page is not in memory, no state information is saved from a particular call to the vm_protectp service. If the page is later paged-in, it receives the default page protection key.
Item | Description |
---|---|
vmid | Specifies the identifier for the virtual memory object for which the page protection key is to be set. |
pfirst | Specifies the first page number in the designated page range. |
npages | Specifies the number of pages in the designated page range. |
key | Specifies the value to be used in setting the page protection key for the designated page range. |
The vm_protectp kernel service can be called from the process environment only.
Item | Description |
---|---|
0 | Indicates a successful operation. |
EINVAL | Indicates
one of the following errors:
|