Function

GLib-2.0GLibtry_malloc0_nSince 2.24

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

    Parameters

    • n_blocks: number

      the number of blocks to allocate

    • n_block_bytes: number

      the size of each block in bytes

    Returns any

    the allocated memory, or null

    2.24