Skip to content

MTY_Realloc

chrisd1100 edited this page Aug 25, 2022 · 1 revision

Resize previously allocated memory.

For more information, see realloc from the C standard library.

void *MTY_Realloc(
    void * mem,
    size_t len,
    size_t size
);

Parameters

mem (void *)

Previously allocated buffer.

len (size_t)

Total number of elements in the new buffer.

size (size_t)

Size of each element.

Return value

void *

The resized buffer. The additional portion of the buffer is not zeroed.

This function can not return NULL. It will call abort() on failure.

The returned buffer must be destroyed with MTY_Free.

Platform support

Windows   macOS   Android   Linux   Web  

See also

Module: Memory

Clone this wiki locally