reallocN

fun reallocN(mem: <Error class: unknown class>? = null, nBlocks: <Error class: unknown class>, nBlockBytes: <Error class: unknown class>): <Error class: unknown class>?

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

If the allocation fails (because the system is out of memory), the program is terminated.

Return

the new address of the allocated memory

Since

2.24

Parameters

mem

the memory to reallocate

nBlocks

the number of blocks to allocate

nBlockBytes

the size of each block in bytes