#include <oskit/c/malloc.h>void *realloc(void *buf, size_t new_size);
Standard issue realloc function. Calls malloc if buf is zero, otherwise calls lmm_alloc to allocate an entirely new block of memory, uses memcpy to copy the old block, and lmm_frees that block when done.May call morecore if the initial attempt to allocate memory fails.
- buf
- Pointer to memory to be enlarged.
- new_size
- Desired size of resulting block.
Returns a pointer to the allocated memory or zero if none.