DosSetMem can be used to commit or decommit a range of previously allocated pages in either a private or shared memory object. It also can be used to create a sparse population of committed private or shared pages within a memory object. DosSetMem can also change the access protection applied to already-committed pages within a memory object.

Each page in the virtual-address space of the process is either free, private, or shared.

The virtual address for free pages is not reserved, not committed, and not accessible. An attempt to commit or decommit a free page results in the return of an error.

The virtual address for pages in a private or shared memory object is reserved during the allocation of the memory object. Each page within a memory object can be in one of two states: