Memory.tryMalloc0_N

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

class Memory
static
void*
tryMalloc0_N

Parameters

nBlocks gsize

the number of blocks to allocate

nBlockBytes gsize

the size of each block in bytes

Return Value

Type: void*

the allocated memory, or NULL

Meta