2.1.4 Virtual Functions

The Virtual functions allow a process to manipulate or determine the status of pages of its virtual address space. For example, using VirtualAlloc , you could reserve or commit a block of pages; and if committing pages, you could specify read/write, read only, or no access. The functions also allow you to specify the desired base address of the allocated pages. Pages committed by VirtualAlloc can be accessed (if they are not protected) using normal pointer references. Other functions enable querying or modifying the access protection of any page in the process' virtual address space. This allows you, for example, to allocate read/write pages to store sensitive data, and then change the access to read only or no access to protect against accidental overwriting.