garbage collection experiment



Hi,

I checked in a CVS module "libggc", which is a trivial GMemVTable
wrapper for the Boehm garbage collector. From the README:

    This is a library that provides a garbage collecting allocator which
    plugs in to GLib 1.3.3 or newer. The collector is the Boehm garbage
    collector, see http://www.hpl.hp.com/personal/Hans_Boehm/gc/.

    This library is a trivial wrapper that adapts Boehm's GC to
    GLib. There are two functions provided; ggc_init() initializes a
    production-use allocator, and ggc_debug_init() initializes a debug
    allocator. Call ggc_debug_check_leaks() to check for leaks when using
    the debug allocator.

    This library is totally untested at the moment. Use at your own risk.
    Seems to work though.

I tried it with gtk+/examples/entry/entry.c and it discovered a leak
of a GdkCursor from gtk_entry_realize(), so that was useful. And the
program did run without crashing. I'm not sure it's good for much
else, but feel free to play with it.

Havoc




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]