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

Developer

API Reference

IREALLOC_ERRREALLOCNAME()

Brew Release
Brew MP 1.0.2
See Also
IRealloc_ErrReallocNameNoZI()
Description
Makes an allocation request to the heap object with zero-initialization, and provides a debug name for the allocated block.
Params
piRealloc
[]:
pointer to the IRealloc interface
nSize
[]:
the requested new size of the block, or zero (0) to request that the block be freed.
ppOut
[]:
(in/out) on entry, *ppOut should have the existing pointer to the block; on exit, *ppOut will have the new pointer to the block, or NULL if a block was freed. On failure, *ppOut is unchanged.
cpszName
[]:
pointer to a zero-terminated character string containing the debug name for this block, or NULL for no name.
Interface
Prototype
  •    int IRealloc_ErrReallocName(IRealloc *piRealloc,
                                   int nSize,
                                   void **ppOut,
                                   const char *cpszName);
    
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 AEE_EMEMPTR - An invalid pointer was detected Another error from AEEStdErr.h, if appropriate
Side Effect
  • None
Comments
Any newly allocated space is guaranteed to be zero-filled. When zero-filled allocation is not required, the non-zero-filling alternative IRealloc_ErrReallocNameNoZI() may be more efficient. The string pointed to by cpszName may be re-used or otherwise discarded immediately upon return from this method; the caller need not preserve the string. Negative values for nSize should be avoided.