Function

GLibrealloc_n

Declaration

gpointer
g_realloc_n (
  gpointer mem,
  gsize n_blocks,
  gsize n_block_bytes
)

Description

This function is similar to g_realloc(), allocating (n_blocks * n_block_bytes) bytes, but care is taken to detect possible overflow during multiplication.

Available since:2.24

Parameters

mem gpointer
 

The memory to reallocate.

n_blocks gsize
 

The number of blocks to allocate.

n_block_bytes gsize
 

The size of each block in bytes.

Return value

Returns: gpointer
 

The new address of the allocated memory.