Garbage collection problem
Adam Megacz
gcj@lists.megacz.com
Tue Aug 20 23:43:00 GMT 2002
Hrm, I also changed natFileDescriptorWin32 to read() into a buffer on
the stack, and then memcpy() that to the heap buffer, since Win32 gets
upset if you ask the kernel to write to a protected page (inc gc
write-protects pages to detect modifications).
Hans later told me this was not necessary, since byte[]'s get
allocated in a PTRFREE block which is never write protected.
That comment in my code actually isn't correct -- the segfaults were
due to a problem in the GC that we fixed a while back, but the problem
was so rare and intermittent that it tricked me into thinking that it
was caused by incremental gc.
- a
Adam King <aking@dreammechanics.com> writes:
> On Tue, Aug 20, 2002 at 04:51:53PM -0700, Adam Megacz wrote:
> >
> > Jeff Sturm <jsturm@one-point.com> writes:
> > > I have no idea if incremental GC is usable on win32, though.
> >
> > Yep, it works.
> >
>> Are you sure? When I do a 'set GC_ENABLE_INCREMENTAL=1' I get
> a "... has caused an error in KERNEL32.DLL" on startup. I then
> tried using 'GC_enable_incremental()' in my native code, but it
> gives the same result. I also noticed that in your xwt code you
> have the following comment in Win32.cc:
>> // turn on incremental GC now that we have a user-visible interface
> // [[this is causing segfaults; enable it later...]]
> // GC_enable_incremental();
>> I would like to use the incremental garbage collector, but I don't
> think it's working under Win32 - unless you have a patch you'd like
> to share? :)
>> Adam
>
--
More information about the Java
mailing list