Memory.tryReallocN

This function is similar to g_try_realloc(), allocating (@n_blocks * @n_block_bytes) bytes, but care is taken to detect possible overflow during multiplication.

struct Memory
static
void*
tryReallocN
(
void* mem
,
size_t nBlocks
,)

Parameters

mem void*

previously-allocated memory, or %NULL.

nBlocks size_t

the number of blocks to allocate

nBlockBytes size_t

the size of each block in bytes

Return Value

Type: void*

the allocated memory, or %NULL.

Meta

Since

2.24