Share via


Memory Management Functions (Windows Embedded CE 6.0)

1/6/2010

The following table shows the memory management functions with a description of the purpose of each.

Function Description

GetDllVersion

Obtains the major and minor version numbers of the system that the specified DLL expects to run on.

GetProcessHeap

Obtains a handle to the heap of the calling process.

GlobalMemoryStatus

Obtains information on the physical and virtual memory of the system.

HeapAlloc

Allocates a block of memory from a heap.

HeapCompact

Compact a specified heap by combining adjacent free blocks of memory and decommitting large free blocks of memory.

HeapCreate

Creates a heap object that is private to the calling process.

HeapDestroy

Destroys the specified heap object.

HeapFree

Frees a memory block allocated from a heap by the HeapAlloc or HeapReAlloc function.

HeapReAlloc

Reallocates a block of memory from a heap.

HeapSize

Returns the size, in bytes, of a memory block allocated from a heap by the HeapAlloc or HeapReAlloc function.

HeapValidate

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

Checks whether the calling process has read access to the memory at the specified address.

IsBadReadPtr

Checks whether the calling process has read access to the specified range of memory.

IsBadWritePtr

Checks whether the calling process has write access to the specified range of memory.

LocalAlloc

Allocates the specified number of bytes from the heap.

LocalFree

Frees the specified local memory object and invalidates its handle.

LocalReAlloc

Changes the size or the attributes of a specified local memory object.

LocalSize

Returns the current size, in bytes, of the specified local memory object.

SecureZeroMemory

Fills a block of memory with zeros.

VirtualAlloc

Reserves or commits a region of pages in the virtual address space of the calling process.

VirtualFree

Releases or decommits, or both, a region of pages within the virtual address space of the calling process.

VirtualProtect

This function changes the access protection on a region of committed pages in the virtual address space of the calling process.

VirtualQuery

This function provides information about a range of pages in the virtual address space of the calling process.

Function Description

CeHeapCreate

Enables users to create a heap with a custom allocator or deallocator function.

CeRemoteHeapCreate

Creates a remote heap in a process. The heap is read-only to the client process, unless the HEAP_CLIENT_READWRITE flag is specified.

CeRemoteHeapTranslatePointer

Converts a pointer to an address that the client process can access.

VirtualAllocEx

Reserves or commits a region of pages in the virtual address space of the calling process.

Memory allocated by VirtualAlloc is initialized to zero.

VirtualAllocCopyEx

Reserves or commits a region of pages in the virtual address space of the calling process, and then dynamically maps a virtual address to a physical address by creating a new page-table entry. Terminate the mapping by calling VirtualFreeEx.

VirtualCopyEx

Dynamically maps a virtual address to a physical address by creating a new page-table entry. Terminate the mapping by calling VirtualFree.

VirtualFreeEx

Releases or decommits, or both, a region of pages within the virtual address space of the calling process.

VirtualQueryEx

Provides information about a range of pages in the virtual address space of the calling process.

VirtualProtectEx

Changes the access protection on a region of committed pages in the virtual address space of the calling process.

VirtualSetAttributesEx

Changes the per-page attributes for a range of virtual memory, which is usually copied from a physical location not known to the kernel. This function is callable only in kernel mode.

See Also

Reference

Memory Management Reference