Function Macro

GLibrenew

Declaration

#define g_renew (
  struct_type,
  mem,
  n_structs
)

Description

Reallocates the memory pointed to by mem, so that it now has space for n_structs elements of type struct_type. It returns the new address of the memory, which may have been moved. Care is taken to avoid overflow when calculating the size of the allocated block.

Parameters

struct_type none
 

The type of the elements to allocate.

mem none
 

The currently allocated memory.

n_structs none
 

The number of elements to allocate.