void g_free (gpointer mem) { if (G_UNLIKELY (!g_mem_initialized)) g_mem_init_nomessage(); if (G_LIKELY (mem)) glib_mem_vtable.vfree (mem); }
gpointer g_try_realloc (gpointer mem, gsize n_bytes) { if (G_UNLIKELY (!g_mem_initialized)) g_mem_init_nomessage(); if (G_LIKELY (n_bytes)) return glib_mem_vtable.vtry_realloc (mem, n_bytes); if (mem) glib_mem_vtable.vfree (mem); return NULL; }
gpointer g_realloc (gpointer mem, gsize n_bytes) { if (G_UNLIKELY (!g_mem_initialized)) g_mem_init_nomessage(); if (G_LIKELY (n_bytes)) { mem = glib_mem_vtable.vrealloc (mem, n_bytes); if (mem) return mem; #if NOT_NEEDED_FOR_NAVIT g_error ("%s: failed to allocate %"G_GSIZE_FORMAT" bytes", G_STRLOC, n_bytes); #endif /* NOT_NEEDED_FOR_NAVIT */ } if (mem) glib_mem_vtable.vfree (mem); return NULL; }