mi_reallocf

Re-allocate memory to newsize bytes.

extern (C) @nogc pure @system nothrow
void*
mi_reallocf
(
void* p
,
size_t newsize
)

Parameters

p
Type: void*

pointer to previously allocated memory (or NULL).

newsize
Type: size_t

the new required size in bytes.

Return Value

Type: void*

pointer to the re-allocated memory of newsize bytes, or NULL if out of memory.

In contrast to mi_realloc(), if NULL is returned, the original pointer p is freed (if it was not NULL itself). Otherwise the original pointer is either freed or returned as the reallocated result (in case it fits in-place with the new size). If the pointer p is NULL, it behaves as mi_malloc(newsize). If newsize is larger than the original size allocated for p, the bytes after size are uninitialized.

Meta