This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: GC incremental
- To: "Boehm, Hans" <hans_boehm at hp dot com>
- Subject: Re: GC incremental
- From: Bryce McKinlay <bryce at waitaki dot otago dot ac dot nz>
- Date: Sun, 30 Sep 2001 16:21:56 +1200
- CC: "'Antonio Ake '" <ake at ecn dot purdue dot edu>, "'java at gcc dot gnu dot org '" <java at gcc dot gnu dot org>
- References: <40700B4C02ABD5119F000090278766443BEC21@hplex1.hpl.hp.com>
Boehm, Hans wrote:
> To get it to work reliably, someone would have to
>make a pass through libgcj, and make sure that all system calls which write
>to the heap are suitably wrapped, so that they don't see protection faults
>while excuting the system call.
>
Now I remembered what the problem is with the protected heap. In
os_dep.c the read() wrapper looks like this:
ssize_t __wrap_read(int fd, void *buf, size_t nbyte)
{
int result;
GC_begin_syscall();
GC_unprotect_range(buf, (word)nbyte);
result = __real_read(fd, buf, nbyte);
GC_end_syscall();
return(result);
}
The GC_begin_syscall() aquires the global allocation lock, effectivly
making all IO single-threaded. Why is that neccessary and can we avoid
it? Also why is the wrapping neccessary anyway? Is it just that kernal
writes to the heap dont get noticed by the GC, or is it more serious
than that?
regards
Bryce.