GC_enable_incremental()

Boehm, Hans hans.boehm@hp.com
Thu Sep 9 00:42:00 GMT 2004


We could.  The collector used to encourage that, but it turns out
it's actually a bit tricky if system calls block for multiple
GCs, etc. 

I think it's not terribly hard to ensure that

1) We don't really turn on incremental GC unless the page size is
such that pointer-free objects do not have to be protected.

2) System calls only write to objects that the collector knows
are pointer-free, or that are not in the collected heap.

I think we do at least 95% of (2).  And it's probably easy to
do the other 5%.  It's just that nobody has ever checked carefully.

Hans

> -----Original Message-----
> From: Andrew Haley [mailto:aph@redhat.com]
> Sent: Wednesday, September 08, 2004 8:48 AM
> To: Hans Boehm
> Cc: Bryce McKinlay; 'DHollenbeck'; java@gcc.gnu.org
> Subject: Re: GC_enable_incremental()
> 
> 
> Hans Boehm writes:
>  > 
>  > The problem isn't really a system call writing pointers.  The
>  > problem is that if a system call writes into the heap, the GC needs
>  > to have been told in advance that that section of memory is
>  > pointerfree.  Otherwise the system call may fail, since the memory
>  > may not be writable.
> 
> Interesting.  Could we not intercept system calls?
> 
> Andrew.
> 



More information about the Java mailing list