DOC: VirtualAlloc Doc Missing MEM_RESET DescriptionLast reviewed: January 15, 1998Article ID: Q162104 |
4.00
WINDOWS NT
DOCERR
kbprg kbdocerr
The information in this article applies to:
SUMMARYA description of the MEM_RESET flag is missing from the VirtualAlloc() portion of the Win32 SDK documentation. This article contains the missing information. Windows NT 4.0 added a new flag, MEM_RESET, to the VirtualAlloc API. The MEM_RESET flag allows you to specify that specific memory pages will neither be written to nor read from the paging file.
MORE INFORMATIONThe MEM_RESET flag specifies that memory pages within the range specified by lpAddress and dwSize will not be written to nor read from the paging file. When you set the MEM_RESET flag, you are declaring that the contents of that range are no longer important. The range is going to be overwritten, and the application does not want the memory to migrate out to or in from the paging file. Setting this flag does not guarantee that the range operated on with MEM_RESET will contain zeroes. If you want the range to contain zeroes, decommit the memory and then recommit it. When you set the MEM_RESET flag, the VirtualAlloc function ignores the value of fProtect. However, you must still set fProtect to a valid protection value, such as PAGE_NOACCESS. VirtualAlloc returns an error if you set the MEM_RESET flag and the range of memory is mapped to a file. A shared view is only acceptable if it is mapped to a paging file.
|
KBCategory: kbprg kbdocerr
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |