Function

GLib-2.0GLibrealloc_nSince 2.24

  • This function is similar to g_realloc(), 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

    • mem: any

      the memory to reallocate

    • n_blocks: number

      the number of blocks to allocate

    • n_block_bytes: number

      the size of each block in bytes

    Returns any

    the new address of the allocated memory

    2.24