C++
void* acdbRealloc( void *, size_t );
File
dbmain.h
Description
Takes a pointer to a memory region previously allocated from the AcDbObject memory heap by acdbAlloc(), and changes its size while preserving its contents.
If p is null, the function behaves like acad_malloc(). If p is not null and size is 0, this function returns a null pointer, and the old region is deallocated.
If the region's new size is smaller than the old size, some previously stored data is lost. If the region's new size exceeds the old, the old data is preserved, and new, uninitialized space is added at the end.
If this function succeeds, it returns a pointer to the memory region, which might be new. If it fails, it returns a null pointer.
If acdbRealloc() does not return the pointer that it was passed, do not attempt to use the old region of memory. The old region will have been deallocated.
Parameters
Parameters | Description |
---|---|
p | Input pointer to existing allocated memory to be reallocated |
size | Input desired number of bytes to be allocated |