Function
GLibmalloc0_n
since: 2.24
Declaration [src]
gpointer
g_malloc0_n(
gsizen_blocks,
gsizen_block_bytes
)
Description [src]
This function is similar to g_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.
Available since: 2.24
Parameters
n_blocks-
Type:
gsizeThe number of blocks to allocate.
n_block_bytes-
Type:
gsizeThe size of each block in bytes.
Return value
Type: gpointer
A pointer to the allocated memory.
The data is owned by the called function.
The return value can be
NULL.