Memory Management Functions
The following table shows the memory management functions with a description of the purpose of each.
Programming element | PPC | SP | Description |
---|---|---|---|
CeHeapCreate | X | X | This function allows users to create a heap with a custom allocator or deallocator function. |
GetDllVersion | X | X | This function retrieves the major and minor version numbers of the system that the specified DLL expects to run on. |
GetProcessHeap | X | X | This function obtains a handle to the heap of the calling process. |
GlobalMemoryStatus | X | X | This function gets information on the physical and virtual memory of the system. |
HeapAlloc | X | X | This function allocates a block of memory from a heap. |
HeapCompact | X | X | This function attempts to compact a specified heap. It compacts the heap by coalescing adjacent free blocks of memory and decommitting large free blocks of memory. |
HeapCreate | X | X | This function creates a heap object that is private to the calling process. |
HeapDestroy | X | X | This function destroys the specified heap object. |
HeapFree | X | X | This function frees a memory block allocated from a heap by the HeapAlloc or HeapReAlloc function. |
HeapReAlloc | X | X | This function reallocates a block of memory from a heap. |
HeapSize | X | X | This function returns the size, in bytes, of a memory block allocated from a heap by the HeapAlloc or HeapReAlloc function. |
HeapValidate | X | X | This function validates the specified heap. HeapValidate scans all the memory blocks in the heap and verifies that the heap control structures maintained by the heap manager are in a consistent state. The HeapValidate function can also be used to validate a single memory block within a specified heap without checking the validity of the entire heap. |
IsBadCodePtr | X | X | This function determines whether the calling process has read access to the memory at the specified address. |
IsBadReadPtr | X | X | This function verifies that the calling process has read access to the specified range of memory. |
IsBadWritePtr | X | X | This function verifies that the calling process has write access to the specified range of memory. |
LocalAlloc | X | X | This function allocates the specified number of bytes from the heap. |
LocalFree | X | X | This function frees the specified local memory object and invalidates its handle. |
LocalReAlloc | X | X | This function changes the size or the attributes of a specified local memory object. |
LocalSize | X | X | This function returns the current size, in bytes, of the specified local memory object. |
SecureZeroMemory | X | X | This function fills a block of memory with zeros. |
VirtualAlloc | X | X | This function reserves or commits a region of pages in the virtual address space of the calling process. |
VirtualFree | X | X | This function releases or decommits, or both, a region of pages within the virtual address space of the calling process. |
VirtualProtect | X | X | This function changes the access protection on a region of committed pages in the virtual address space of the calling process. |
VirtualQuery | X | X | This function provides information about a range of pages in the virtual address space of the calling process. |
See Also
Send Feedback on this topic to the authors