記憶體管理函式包括:通用記憶體函式、數據執行保護函式、檔案映射函式等
基本介紹
- 中文名:記憶體管理函式
- 外文名:Memory Management Function
- 包括1:Bad Memory Functions
- 包括2:Heap Functions
Function | Description |
---|---|
AddSecureMemoryCacheCallback | Registers a callback function to be called when a secured memory range is freed or its protections are changed. |
Copies a block of memory from one location to another. | |
CreateMemoryResourceNotification | Creates a memory resource notification object. |
FillMemory | Fills a block of memory with a specified value. |
GetLargePageMinimum | Retrieves the minimum size of a large page. |
GetPhysicallyInstalledSystemMemory | Retrieves the amount of RAM that is physically installed on the computer. |
GetSystemFileCacheSize | Retrieves the current size limits for the working set of the system cache. |
GetWriteWatch | Retrieves the addresses of the pages that have been written to in a region of virtual memory. |
GlobalMemoryStatusEx | Obtains information about the system's current usage of both physical and virtual memory. |
Moves a block of memory from one location to another. | |
QueryMemoryResourceNotification | Retrieves the state of the specified memory resource object. |
RemoveSecureMemoryCacheCallback | Unregisters a callback function that was previously registered with the AddSecureMemoryCacheCallback function. |
ResetWriteWatch | Resets the write-tracking state for a region of virtual memory. |
SecureMemoryCacheCallback | An application-defined function that is called when a secured memory range is freed or its protections are changed. |
SecureZeroMemory | Fills a block of memory with zeros. |
SetSystemFileCacheSize | Limits the size of the working set for the file system cache. |
Fills a block of memory with zeros. |
Function | Description |
---|---|
GetProcessDEPPolicy | Retrieves DEP settings for a process. |
GetSystemDEPPolicy | Retrieves DEP settings for the system. |
SetProcessDEPPolicy | Changes DEP settings for a process. |
Function | Description |
---|---|
Creates or opens a named or unnamed file mapping object for a specified file. | |
CreateFileMappingNuma | Creates or opens a named or unnamed file mapping object for a specified file, and specifies the NUMA node for the physical memory. |
Writes to the disk a byte range within a mapped view of a file. | |
GetMappedFileName | Checks whether the specified address is within a memory-mapped file in the address space of the specified process. If so, the function returns the name of the memory-mapped file. |
Maps a view of a file mapping into the address space of a calling process. | |
MapViewOfFileEx | Maps a view of a file mapping into the address space of a calling process. A caller can optionally specify a suggested memory address for the view. |
MapViewOfFileExNuma | Maps a view of a file mapping into the address space of a calling process, and specifies the NUMA node for the physical memory. |
Opens a named file mapping object. | |
Unmaps a mapped view of a file from the calling process's address space. |
Function | Description |
---|---|
AllocateUserPhysicalPages | Allocates physical memory pages to be mapped and unmapped within any AWE region of the process. |
FreeUserPhysicalPages | Frees physical memory pages previously allocated with AllocateUserPhysicalPages. |
MapUserPhysicalPages | Maps previously allocated physical memory pages at the specified address within an AWE region. |
MapUserPhysicalPagesScatter | Maps previously allocated physical memory pages at the specified address within an AWE region. |
Function | Description |
---|---|
Obtains a handle to the heap of the calling process. | |
GetProcessHeaps | Obtains handles to all of the heaps that are valid for the calling process. |
Allocates a block of memory from a heap. | |
HeapCompact | Coalesces adjacent free blocks of memory on a heap. |
Creates a heap object. | |
HeapDestroy | Destroys the specified heap object. |
Frees a memory block allocated from a heap. | |
HeapLock | Attempts to acquire the lock associated with a specified heap. |
HeapQueryInformation | Retrieves information about the specified heap. |
HeapReAlloc | Reallocates a block of memory from a heap. |
HeapSetInformation | Sets heap information for the specified heap. |
HeapSize | Retrieves the size of a memory block allocated from a heap. |
HeapUnlock | Releases ownership of the lock associated with a specified heap. |
HeapValidate | Attempts to validate a specified heap. |
HeapWalk | Enumerates the memory blocks in a specified heap. |
Function | Description |
---|---|
PrefetchVirtualMemory | Prefetches virtual address ranges into physical memory. |
Reserves or commits a region of pages in the virtual address space of the calling process. | |
Reserves or commits a region of pages in the virtual address space of the specified process. | |
VirtualAllocExNuma | Reserves or commits a region of memory within the virtual address space of the specified process, and specifies the NUMA node for the physical memory. |
Releases or decommits a region of pages within the virtual address space of the calling process. | |
Releases or 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. |
Changes the access protection on a region of committed pages in the virtual address space of the calling process. | |
Changes the access protection on a region of committed pages in the virtual address space of the calling process. | |
VirtualQuery | Provides information about a range of pages in the virtual address space of the calling process. |
Provides information about a range of pages in the virtual address space of the calling process. | |
VirtualUnlock | Unlocks a specified range of pages in the virtual address space of a process. |
Function | Description | Corresponding heap function |
---|---|---|
GlobalAlloc, LocalAlloc | Allocates the specified number of bytes from the heap. | |
GlobalDiscard, LocalDiscard | Discards the specified global memory block. | Not applicable. |
GlobalFlags, LocalFlags | Returns information about the specified global memory object. | Not applicable. Use HeapValidateto validate the heap. |
GlobalFree, LocalFree | Frees the specified global memory object. | |
GlobalHandle, LocalHandle | Retrieves the handle associated with the specified pointer to a global memory block. This function should be used only with OLE and clipboard functions that require it. | Not applicable. |
GlobalLock, LocalLock | Locks a global memory object and returns a pointer to the first byte of the object's memory block. | Not applicable. |
GlobalReAlloc, LocalReAlloc | Changes the size or attributes of a specified global memory object. | HeapReAlloc |
GlobalSize, LocalSize | Retrieves the current size of the specified global memory object. | HeapSize |
GlobalUnlock, LocalUnlock | Decrements the lock count associated with a memory object. This function should be used only with OLE and clipboard functions that require it. | Not applicable. |
Function | Description |
---|---|
BadMemoryCallbackRoutine | An application-defined function registered with the RegisterBadMemoryNotification function that is called when one or more bad memory pages are detected. |
GetMemoryErrorHandlingCapabilities | Gets the memory error handling capabilities of the system. |
RegisterBadMemoryNotification | Registers a bad memory notification that is called when one or more bad memory pages are detected. |
UnregisterBadMemoryNotification | Closes the specified bad memory notification handle. |