Struct
GLibMemVTable
Description [src]
structGMemVTable{
gpointer(*malloc)(
gsizen_bytes
);;
gpointer(*realloc)(
gpointermem,
gsizen_bytes
);;
void(*free)(
gpointermem
);;
gpointer(*calloc)(
gsizen_blocks,
gsizen_block_bytes
);;
gpointer(*try_malloc)(
gsizen_bytes
);;
gpointer(*try_realloc)(
gpointermem,
gsizen_bytes
);;
}
A set of functions used to perform memory allocation. The same GMemVTable must
be used for all allocations in the same program; a call to g_mem_set_vtable(),
if it exists, should be prior to any use of GLib.
This functions related to this has been deprecated in 2.46, and no longer work.
Structure members
malloc:gpointer (* malloc) ( gsize n_bytes )Function to use for allocating memory.
realloc:gpointer (* realloc) ( gpointer mem, gsize n_bytes )Function to use for reallocating memory.
free:void (* free) ( gpointer mem )Function to use to free memory.
calloc:gpointer (* calloc) ( gsize n_blocks, gsize n_block_bytes )Function to use for allocating zero-filled memory.
try_malloc:gpointer (* try_malloc) ( gsize n_bytes )Function to use for allocating memory without a default error handler.
try_realloc:gpointer (* try_realloc) ( gpointer mem, gsize n_bytes )Function to use for reallocating memory without a default error handler.