mem_set_vtable


Description:

public void mem_set_vtable (MemVTable vtable)

Sets the MemVTable to use for memory allocation.

You can use this to provide custom memory allocation routines.

The vtable only needs to provide malloc, realloc, and free functions; GLib can provide default implementations of the others. The malloc and realloc implementations should return null on failure, GLib will handle error-checking for you. vtable is copied, so need not persist after this function has been called.

Note that this function must be called before using any other GLib functions.

Parameters:

vtable

table of memory allocation routines.


Namespace: GLib
Package: glib-2.0