summaryrefslogtreecommitdiff
path: root/glib/gmem.h
diff options
context:
space:
mode:
authorTim Janik <timj@imendio.com>2006-01-25 15:51:43 +0000
committerTim Janik <timj@src.gnome.org>2006-01-25 15:51:43 +0000
commiteda944bca5d621ea3daec19abf6c7813b266927a (patch)
treeadc7d1545239a230527cf14bbe8f29a3130f48a2 /glib/gmem.h
parent7b744cf4d25b2c80cd28efd3e48fd08862b87beb (diff)
downloadglib-eda944bca5d621ea3daec19abf6c7813b266927a.tar.gz
honour g_mem_gc_friendly settings when freeing slices, make sure
Wed Jan 25 16:39:18 2006 Tim Janik <timj@imendio.com> * glib/gslice.c: honour g_mem_gc_friendly settings when freeing slices, make sure g_mem_gc_friendly is properly initialized. * gmem.[hc]: ensure g_mem_gc_friendly is initialized from G_DEBUG upon the first allocation. applied some branching optimizations. * docs/macros.txt: reflected --enable-gc-friendly change and described ENABLE_GC_FRIENDLY_DEFAULT as well as G_DEBUG=gc-friendly. * configure.in: changed --enable-gc-friendly=yes to define ENABLE_GC_FRIENDLY_DEFAULT. * glib/garray.c: changed ENABLE_GC_FRIENDLY macro #ifdef-s to if (G_UNLIKELY (g_mem_gc_friendly)). * glib/gtree.c: * glib/ghash.c: removed ENABLE_GC_FRIENDLY code which is now taken care of by g_slice_free1(). * tests/slice-test.c: fixed leaks, reported by Kjartan Maraas.
Diffstat (limited to 'glib/gmem.h')
-rw-r--r--glib/gmem.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/glib/gmem.h b/glib/gmem.h
index ec1fb6919..ecae68052 100644
--- a/glib/gmem.h
+++ b/glib/gmem.h
@@ -92,6 +92,8 @@ struct _GMemVTable
void g_mem_set_vtable (GMemVTable *vtable);
gboolean g_mem_is_system_malloc (void);
+GLIB_VAR gboolean g_mem_gc_friendly;
+
/* Memory profiler and checker, has to be enabled via g_mem_set_vtable()
*/
GLIB_VAR GMemVTable *glib_mem_profiler_table;