Re: Turning off the slice allocator
- From: Tim Janik <timj gtk org>
- To: Gtk+ Developers <gtk-devel-list gnome org>
- Subject: Re: Turning off the slice allocator
- Date: Mon, 23 Jan 2006 17:22:20 +0100 (CET)
[resending, because my initial email seems to got lost somehow]
On Fri, 20 Jan 2006, Matthias Clasen wrote:
Federico asked for this earlier, so I sat down and wrote a very
quick patch. It doesn't make everything in SliceConfig available via G_DEBUG,
just the always_malloc flag for now. Thats probably enough for most
people who want to turn off the slice allocator to debug memory overruns.
With the patch, you can do G_DEBUG=always_malloc foobar
to have foobar run without slice allocator. The patch currently
overrides a value set by g_slice_set_config().
Tim, do you think this is good enough ?
hmmm, no. or better, it's not exactly what _i_ had in mind for gslice ;)
i'm currently working on a dedicated G_SLICE variable that can support
different checking/debugging modes, similar to MALLOC_CHECK_ as documented
in glibc's malloc(3).
what i think would be great is if we reworked your patch to support
G_DEBUG=gc-friendly which sets a glib variable glib_mem_gc_friendly to
TRUE.
then, all the #ifdef ENABLE_GC_FRIENDLY statements in glib can be changed to
if (glib_mem_gc_friendly), to enable memory debugging/profiling without
recompilation of glib (and for stock distribution binary packages).
Matthias
---
ciaoTJ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]