Controls memory by changing the attributes of a specified region of memory.
#include <nks/memory.h> int NXMemCtl ( void *start, size_t size, unsigned long flags);
(IN) Points to the starting address of the region to which the control operation is to be applied. This address must be page aligned.
(IN) Specifies the size, in pages, of the target region.
(IN) Specifies the control operations to apply to the target region by specifying one of the following flags:
If successful, returns zero; otherwise returns one of the following:
The lock and unlock flags can pertain to state, rather than rights. NXMemCtl allows you to move pages (or any subset of pages) back and forth between a committed and reserved state.
For sample code, see Memory.c.