malloc0N
fn
void * malloc0N(size_t nBlocks, size_t nBlockBytes)This function is similar to [glib.global.malloc0], 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.
Parameters
nBlocks | the number of blocks to allocate |
nBlockBytes | the size of each block in bytes |
Returns
a pointer to the allocated memory