memoryapi.h header

This header is used by System Services. For more information, see:

  • System Services memoryapi.h contains the following programming interfaces:

Functions

Title Description
AllocateUserPhysicalPages Allocates physical memory pages to be mapped and unmapped within any Address Windowing Extensions (AWE) region of a specified process.
AllocateUserPhysicalPagesNuma Allocates physical memory pages to be mapped and unmapped within any Address Windowing Extensions (AWE) region of a specified process and specifies the NUMA node for the physical memory.
CreateFileMappingFromApp Creates or opens a named or unnamed file mapping object for a specified file from a Windows Store app.
CreateFileMappingNumaW Creates or opens a named or unnamed file mapping object for a specified file and specifies the NUMA node for the physical memory.
CreateFileMappingW Creates or opens a named or unnamed file mapping object for a specified file.
CreateMemoryResourceNotification Creates a memory resource notification object.
DiscardVirtualMemory Discards the memory contents of a range of memory pages, without decommitting the memory. The contents of discarded memory is undefined and must be rewritten by the application.
FlushViewOfFile Writes to the disk a byte range within a mapped view of a file.
FreeUserPhysicalPages Frees physical memory pages that are allocated previously by using AllocateUserPhysicalPages or AllocateUserPhysicalPagesNuma.
GetLargePageMinimum Retrieves the minimum size of a large page.
GetMemoryErrorHandlingCapabilities Gets the memory error handling capabilities of the system.
GetProcessWorkingSetSizeEx Retrieves the minimum and maximum working set sizes of the specified process.
GetSystemFileCacheSize Retrieves the current size limits for the working set of the system cache.
GetWriteWatch Retrieves the addresses of the pages that are written to in a region of virtual memory.
MapUserPhysicalPages Maps previously allocated physical memory pages at a specified address in an Address Windowing Extensions (AWE) region.
MapViewOfFile Maps a view of a file mapping into the address space of a calling process.
MapViewOfFile2 Maps a view of a file or a pagefile-backed section into the address space of the specified process.
MapViewOfFile3 Maps a view of a file or a pagefile-backed section into the address space of the specified process.
MapViewOfFile3FromApp Maps a view of a file mapping into the address space of a calling Windows Store app.
MapViewOfFileEx Maps a view of a file mapping into the address space of a calling process. A caller can optionally specify a suggested base memory address for the view.
MapViewOfFileFromApp Maps a view of a file mapping into the address space of a calling Windows Store app.
MapViewOfFileNuma2 Maps a view of a file or a pagefile-backed section into the address space of the specified process.
OfferVirtualMemory Indicates that the data contained in a range of memory pages is no longer needed by the application and can be discarded by the system if necessary.
OpenFileMappingFromApp Opens a named file mapping object.
OpenFileMappingW Opens a named file mapping object.
PrefetchVirtualMemory Provides an efficient mechanism to bring into memory potentially discontiguous virtual address ranges in a process address space.
QueryMemoryResourceNotification Retrieves the state of the specified memory resource object.
QueryVirtualMemoryInformation The QueryVirtualMemoryInformation function returns information about a page or a set of pages within the virtual address space of the specified process.
ReclaimVirtualMemory Reclaims a range of memory pages that were offered to the system with OfferVirtualMemory.
RegisterBadMemoryNotification Registers a bad memory notification that is called when one or more bad memory pages are detected.
ResetWriteWatch Resets the write-tracking state for a region of virtual memory. Subsequent calls to the GetWriteWatch function only report pages that are written to since the reset operation.
SetProcessValidCallTargets Provides Control Flow Guard (CFG) with a list of valid indirect call targets and specifies whether they should be marked valid or not.
SetProcessWorkingSetSizeEx Sets the minimum and maximum working set sizes for the specified process.
SetSystemFileCacheSize Limits the size of the working set for the file system cache.
UnmapViewOfFile Unmaps a mapped view of a file from the calling process's address space.
UnmapViewOfFile2 Unmaps a previously mapped view of a file or a pagefile-backed section.
UnmapViewOfFileEx This is an extended version of UnmapViewOfFile that takes an additional flags parameter.
UnregisterBadMemoryNotification Closes the specified bad memory notification handle.
VirtualAlloc Reserves, commits, or changes the state of a region of pages in the virtual address space of the calling process.
VirtualAlloc2 Reserves, commits, or changes the state of a region of memory within the virtual address space of a specified process. The function initializes the memory it allocates to zero.
VirtualAlloc2FromApp Reserves, commits, or changes the state of a region of pages in the virtual address space of the calling process.
VirtualAllocEx Reserves, commits, or changes the state of a region of memory within the virtual address space of a specified process. The function initializes the memory it allocates to zero.
VirtualAllocExNuma Reserves, commits, or changes the state of a region of memory within the virtual address space of the specified process, and specifies the NUMA node for the physical memory.
VirtualAllocFromApp Reserves, commits, or changes the state of a region of pages in the virtual address space of the calling process.
VirtualFree Releases, decommits, or releases and decommits a region of pages within the virtual address space of the calling process.
VirtualFreeEx Releases, decommits, or releases and decommits a region of memory within the virtual address space of a specified process.
VirtualLock Locks the specified region of the process's virtual address space into physical memory, ensuring that subsequent access to the region will not incur a page fault.
VirtualProtect Changes the protection on a region of committed pages in the virtual address space of the calling process.
VirtualProtectEx Changes the protection on a region of committed pages in the virtual address space of a specified process.
VirtualProtectFromApp Changes the protection on a region of committed pages in the virtual address space of the calling process.
VirtualQuery Retrieves information about a range of pages in the virtual address space of the calling process.
VirtualQueryEx Retrieves information about a range of pages within the virtual address space of a specified process.
VirtualUnlock Unlocks a specified range of pages in the virtual address space of a process, enabling the system to swap the pages out to the paging file if necessary.
WriteProcessMemory Writes data to an area of memory in a specified process. The entire area to be written to must be accessible or the operation fails.

Structures

Title Description
WIN32_MEMORY_RANGE_ENTRY Specifies a range of memory.
WIN32_MEMORY_REGION_INFORMATION Contains information about a memory region.