[Gc] gc_typed.h

Boehm, Hans hans.boehm at hp.com
Thu May 11 12:04:14 PDT 2006

It is current, minimally tested by gctest, but I believe infrequently
used.  I don't recall any documentation beyond the somewhat cryptic
comments in the header file.  There is some small performance cost to
supporting it, so it wouldn't have stayed there if I felt it was

This is one way of precisely describing pointer locations in objects to
the collector.  GC_gcj_malloc is another, which is now used by both Gcj
and Mono, and hence better tested.  If your objects have something like
a vtable pointer in the zeroth slot, to which you could add a GC
descriptor, then I would suggest using GC_gcj_malloc.

The general experience is that providing precise type/pointer location
information typically has no performance impact on small examples.  In
somewhat larger examples, you can often get much of the same benefit by
allocating entirely pointerfree objects with GC_malloc_atomic.  But
providing the information does significantly reduce the probability of
things going wrong in atypical situations.

If you can't make sense out of the header comments for
GC_make_descriptor and GC_malloc_explicitly_typed, possibly together
with the one or two examples in test.c, let me know, and I'll try to add
a bit of documentation.


> -----Original Message-----
> From: gc-bounces at napali.hpl.hp.com 
> [mailto:gc-bounces at napali.hpl.hp.com] On Behalf Of Travis Griggs
> Sent: Thursday, May 11, 2006 10:15 AM
> To: gc at napali.hpl.hp.com
> Subject: [Gc] gc_typed.h
> I'm trying to ressurect support for GC in the gnustep 
> objective-c library. At one point this worked and someone 
> looked to do a semi- moderate integration, but there's not 
> been much support for it. Now that there's sidestep (a branch 
> of gnustep-base that doesn't require GNUMakefiles or any of 
> the desktop environment setup), I thought I'd see if I can't 
> make it work again. It compiles fine, but on running a test 
> that just allocates NSObject, it doesn't actually ever 
> reclaim the memory.
> So one thing it uses that is new to me in my forrays with 
> libgc, is the gc_typed.h stuff. Is there a README that 
> explains this stuff works, what its purpose is. Is it current 
> and preferred? Or is it one of those experiments that was 
> tried, but doesn't really make much difference? If it doesn't 
> make any real difference, it would be far simpler code wise 
> to use GC_MALLOC() for new and move on.
> --
> Travis Griggs
> Objologist
> "There are a thousand hacking at the branches of evil to one 
> who is striking at the root" - Henry David Thoreau
> -----------------------------------------
> DISCLAIMER: This email is bound by the terms and conditions 
> described at https://www.key.net/disclaimer.htm
> _______________________________________________
> Gc mailing list
> Gc at linux.hpl.hp.com
> https://www.hpl.hp.com/hosted/linux/mail-archives/gc/

More information about the Gc mailing list