Re: ORBit and the Boehm garbage collector
- From: Dick Porter <dick acm org>
- To: orbit-list gnome org
- Subject: Re: ORBit and the Boehm garbage collector
- Date: Thu, 19 Oct 2000 10:10:49 +0100
On Wed, Oct 18, 2000 at 05:25:37PM +0100, Philip Lijnzaad wrote:
> Dear all,
>
> just a brief question:
>
> has anyone tried to compile ORBit (and servers, and clients) using a garbage
> collector such as the one by Hans Boehm (see
> http://reality.sgi.com/boehm_mti/gc.html) ?
Theres a simple answer: try it and see!
All ORBit internal memory allocation should be using the glib g_malloc,
g_malloc0, g_realloc and g_free functions (which in turn call malloc() etc
but also do additional housekeeping) or their g_new wrappers. I have done some
simple experiments with the Boehm GC lib and glib, by redefining the g_*
functions to call GC_malloc(), and it seems to work.
Other libraries may well use malloc(), so you may want to redefine that
too, or play other linker tricks. (I redefined g_malloc, because I didnt
want glib's own housekeeping to collide with Boehm's).
>
> I imagine that this could be made to work easily, and would make programming
> with ORBit that much easier.
>
> Also, it would make adding yet more language mappings easier, because the
> resource management that much easier
Let us know :-)
>
> Cheers,
>
> Philip
- Dick
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]