This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
RE: [RFA] boehm-gc for AIX
- From: "Boehm, Hans" <hans_boehm at hp dot com>
- To: "'Bryce McKinlay'" <bryce at waitaki dot otago dot ac dot nz>, Jeff Sturm <jsturm at one-point dot com>
- Cc: Tom Tromey <tromey at redhat dot com>, David Edelsohn <dje at watson dot ibm dot com>, "Boehm, Hans" <hans_boehm at hp dot com>, java at gcc dot gnu dot org
- Date: Tue, 29 Jan 2002 13:13:23 -0800
- Subject: RE: [RFA] boehm-gc for AIX
Based on my pat experience (which predates JNI, unfortunately), I would be
very careful about designing the CNI interface so as to minimize the chance
for overlooked pointers into the garbage collected heap.
I would greatly prefer that we either:
1) Arrange for statically allocated variables to be scanned by the GC by
default. I guess we could describe this as the "opt-out" model for root
registration. Or
2) Have a plan for diagnosing missing root registrations, e.g. an
environment variable setting that asks the collector to register all static
data segments up to address N as roots. (This would still require finding
the main data segment on platforms like AIX.)
The first basically requires a conservative collector, in that you at least
need to be able to handle C unions conservatively. The second means only
that you lose some debugging functionality if you go to a nonconservative
collector.
I think it would also be nice to have an established way to redirect
malloc/new in CNI code so that they allocate traced, but not collected,
memory. As it stands, I believe there is no easy way to get the collector
to scan C/C++ objects in CNI?
Hans
> -----Original Message-----
> From: Bryce McKinlay [mailto:bryce@waitaki.otago.ac.nz]
> Sent: Monday, January 28, 2002 3:12 PM
> To: Jeff Sturm
> Cc: Tom Tromey; David Edelsohn; Boehm, Hans; java@gcc.gnu.org
> Subject: Re: [RFA] boehm-gc for AIX
>
>
> Jeff Sturm wrote:
>
> >CNI invocation is another problem... it's unfortunate that
> the CNI spec
> >says nothing about static roots, so it seems to imply the
> existence of a
> >conservative GC.
> >
>
> We could certainly add something to the spec to say that any global
> variables holding Java objects must be declared in Java. This would
> probibly make things easier for a theoretical non-conservative GC in
> future. I don't think I've seen any CNI code which does
> otherwise anyway.
>
> regards
>
> Bryce.
>
>