pub type GMemVTable = _GMemVTable;
Expand description
GMemVTable: @malloc: function to use for allocating memory. @realloc: function to use for reallocating memory. @free: function to use to free memory. @calloc: function to use for allocating zero-filled memory. @try_malloc: function to use for allocating memory without a default error handler. @try_realloc: function to use for reallocating memory without a default error handler.
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.
Aliased Type§
struct GMemVTable {
pub malloc: Option<unsafe extern "C" fn(u64) -> *mut c_void>,
pub realloc: Option<unsafe extern "C" fn(*mut c_void, u64) -> *mut c_void>,
pub free: Option<unsafe extern "C" fn(*mut c_void)>,
pub calloc: Option<unsafe extern "C" fn(u64, u64) -> *mut c_void>,
pub try_malloc: Option<unsafe extern "C" fn(u64) -> *mut c_void>,
pub try_realloc: Option<unsafe extern "C" fn(*mut c_void, u64) -> *mut c_void>,
}
Fields§
§malloc: Option<unsafe extern "C" fn(u64) -> *mut c_void>
§realloc: Option<unsafe extern "C" fn(*mut c_void, u64) -> *mut c_void>
§free: Option<unsafe extern "C" fn(*mut c_void)>
§calloc: Option<unsafe extern "C" fn(u64, u64) -> *mut c_void>
§try_malloc: Option<unsafe extern "C" fn(u64) -> *mut c_void>
§try_realloc: Option<unsafe extern "C" fn(*mut c_void, u64) -> *mut c_void>