Resources | developer.brewmp.com Resources | developer.brewmp.com

Developer

resources

IHeap1 interface

IHeap1 is an interface for allocating memory that provides the following features:

  • Allocated memory is zero-initialized (ZI) be default. A NoZI function is provided to skip zero-intialization.
  • Functions that accept a debug name, which is stored along with the memory block.
  • Functions return a non-zero error code on allocation failure. The pointer should be ignored.
  • A node of size zero is interpreted not as an allocation request, but as a request to free the block.
  • Lock function to prevent nodes from being moved, as well as an unlock function to allow node movement (IHeap1_Lock() and IHeap1_Unlock, respectively).
  • Functions with "Err" in the function name return an error code rather than a pointer.

For more information, see the following:

Required Files
AEEIHeap1.h
Class ID(s)
None
Interface ID
AEEIID_IHeap1
Location
\platform\system\inc\OEM

IHeap1_ErrMalloc()

This function allocates a block of heap memory. Note that it is inherited from IRealloc_ErrMalloc.

IHeap1_ErrRealloc()

This function resizes a block of heap memory.

IHeap1_Free()

This function frees a block of heap memory.