mi_expand

Try to re-allocate memory to newsize bytes in place.

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

Parameters

p void*

pointer to previously allocated memory (or NULL).

newsize size_t

the new required size in bytes.

Return Value

Type: void*

pointer to the re-allocated memory of newsize bytes (always equal to p), or NULL if either out of memory or if the memory could not be expanded in place. If NULL is returned, the pointer p is not freed. Otherwise the original pointer is returned as the reallocated result since it fits in-place with the new size. If newsize is larger than the original size allocated for p, the bytes after size are uninitialized.

Meta