Share via


PFN_AllocHeapMem (Compact 2013)

10/16/2014

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

See Also

Reference

Kernel Functions Available to the OAL
PFN_FreeHeapMem