Share via


PFN_AllocHeapMem (Windows Embedded CE 6.0)

1/5/2010

This function is a custom allocator function for heaps.

Syntax

typedef LPVOID (*PFN_AllocHeapMem)(
  LPVOID pAddr,
  DWORD cbSize,
  DWORD fdwAction,
  LPDWORD pdwUserData
);

Parameters

  • pAddr
    [in] Address to allocate memory; always page-aligned.
  • cbSize
    [in] Size of the allocation.
  • fdwAction
    [in] Value that specifies the action.

    The following table shows values for this parameter.

    Value Description

    MEM_RESERVE

    Reserve memory of size cbSize.

    The pAddr parameter is a hint that it can be passed directly to the VirtualAlloc function or the allocator can ignore it.

    MEM_COMMIT

    Commit cbSize bytes of memory from pAddr.

  • pdwUserData
    [in] A DWORD associated with each memory reservation, which can be used by the allocator to store information.

Return Value

A pointer to the memory allocated indicates success.

NULL indicates failure.

Requirements

Header Developer Implemented
Library coredll.lib
Windows Embedded CE Windows CE 5.0 and later

See Also

Reference

Other OAL Functions
PFN_FreeHeapMem

Other Resources

CeHeapCreate