Function

GLib-2.0GLibmalloc0_nSince 2.24

  • 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.

    Parameters

    • n_blocks: number

      the number of blocks to allocate

    • n_block_bytes: number

      the size of each block in bytes

    Returns any

    a pointer to the allocated memory

    2.24