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

Developer

API Reference

IREALLOC_ERRMALLOCREC()

Brew Release
Brew MP 1.0.2
See Also
IRealloc_ErrMalloc()
Description
Helper macro for allocating blocks capable of holding a particular data type.
Params
piRealloc
[]:
pointer to the IRealloc interface : the type name of a valid C type
ppOut
[]:
(out) on exit, *ppOut will have the new pointer to the block, or NULL if no block was allocated.
Prototype
  •    int IREALLOC_ERRMALLOCREC(IRealloc *piRealloc,
                                 ,
                                  **ppOut);
    
Return
  • AEE_SUCCESS - Allocation (or free) was successful AEE_ENOMEMORY - Not enough memory to fulfill the request AEE_EHEAP - An internal heap error was detected Another error from AEEStdErr.h, if appropriate
Side Effect
  • None
Comments
This helper macro may be used to request a zero-initialized block of memory capable of holding a particular data type. Example: struct foo *pFoo; nErr = IREALLOC_ERRMALLOCREC(piRealloc, struct foo, &pFoo); if (AEE_SUCCESS == nErr) { ... Fill in the empty structure pointed to by pFoo ... }