GMemVTable

Members

Variables

calloc
gpointer function(gsize n_blocks, gsize n_block_bytes) calloc;
Undocumented in source.
free
gpointer function(gpointer mem) free;
Undocumented in source.
malloc
gpointer function(gsize n_bytes) malloc;
Undocumented in source.
realloc
gpointer function(gpointer mem, gsize n_bytes) realloc;
Undocumented in source.
try_malloc
gpointer function(gsize n_bytes) try_malloc;
Undocumented in source.
try_realloc
gpointer function(gpointer mem, gsize n_bytes) try_realloc;
Undocumented in source.

Return Value

a pointer to the new allocated memory, cast to a pointer to @struct_type

Detailed Description

g try renew

@struct_type: the type of the elements to allocate @mem: the currently allocated memory @n_structs: the number of elements to allocate

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.

Meta

Since

2.8