API Reference | developer.brewmp.com API Reference | developer.brewmp.com

Developer

API Reference

IHEAP_MALLOC()

Brew Release
Brew MP 1.0.2
See Also
IHeap IHEAP_Realloc() IHEAP_MallocRec()
Description
This function allocates a block of memory of the requested size and returns a pointer to that memory block. By default, memory allocated using IHEAP_Malloc() is initialized to zero. This behavior can be disabled by performing a bitwise OR of the flag ALLOC_NO_ZMEM with the dwSize parameter.
Use of this method is discouraged. Use MALLOC() instead.
Params
pIHeap
[]:
Pointer to the IHeap interface object.
dwSize
[]:
Specifies the size of the memory block to be allocated (optionally OR'ed with ALLOC_NO_ZMEM).
Interface
  • IHEAP
Prototype
  • void * IHEAP_Malloc(IHeap * pIHeap, uint32 dwSize);
    
Return
  • Pointer to the allocated memory block: if successful. NULL: Failure.
Side Effect
  • If the heap cannot immediately satisfy the request, this call may send a notification to applets in the system asking them to release unneeded memory; if this doesn't free up enough memory, background applications may be closed in order to satisfy the request.
Comments
Use of this method is discouraged. Use MALLOC() instead. Specifying a dwSize of zero will result in a return value of NULL.