nsIMemory:realloc
From MDC
Contents |
[edit] Summary
The realloc function reallocates a block of memory to a new size.
[noscript, notxpcom] voidPtr realloc( in voidPtr aPtr, in size_t aNewSize );
[edit] Parameters
- aPtr
- [in] The address of the memory block to reallocate. This may be nsnull, in which case realloc behaves like
nsIMemory::alloc. - aNewSize
- [in] Specifies the new size in bytes of the block of memory to allocate. This may be 0, in which case realloc behaves like
nsIMemory::free.
[edit] Return Values
This method returns nsnull if the memory allocation fails. Otherwise, it returns a pointer to the newly allocated memory segment. The result must be freed with a call to nsIMemory::free when it is no longer needed.