Function Macro

GLibtry_renew

Declaration [src]

#define g_try_renew (
  struct_type,
  mem,
  n_structs
)

Description [src]

Attempts to reallocate the memory pointed to by mem, so that it now has space for n_structs elements of type struct_type, and returns NULL on failure. Contrast with g_renew(), which aborts the program on failure. It returns the new address of the memory, which may have been moved. The function returns NULL if an overflow occurs.

Available since:2.8

Parameters

struct_type -
 

The type of the elements to allocate.

mem -
 

The currently allocated memory.

n_structs -
 

The number of elements to allocate.