status of gcj's boehm collector?
Boehm, Hans
hans_boehm@hp.com
Wed Dec 5 10:48:00 GMT 2001
> From: Bryce McKinlay [mailto:bryce@waitaki.otago.ac.nz]
>> Adam Megacz wrote:
>> >But would ioctl ever write a pointer value to the heap?
> >
> >If all it ever writes is non-pointer data (even if it possibly
> >overwrites a pointer with a nonpointer value), then you can get away
> >with not using the write-barrier, as long as you periodically perform
> >a full heap scan.
> >
It depends. Usually neither ioctl nor read will write heap pointers, and
having them do so is likely to be dubious. If they do, the client code has
to be careful anyway, to make sure that there were other pointers to the
referenced objects before the data was read in, so it didn't get collected
in the meantime. The real danger is probably an ioctl (or read) that fills
in a part of an object, where other parts of the object contain pointers.
Thus the page containing the object would still need to be write-protected,
but the system call might trigger the fault.
>> My understanding was that the kernel was going to do something nasty
> like terminate your application if it tried to write and found a
> write-protected page? If all that happens is that the page
> doesn't get
> dirtied, I agree that it isn't likely to be a problem otherwise since
> the kernel probibly isn't going to write pointers anywhere (certainly
> not pointers to heap objects).
>> Bryce.
Generally the system call will return EFAULT. That's only slightly better
than killing your application, since I don't think there's a guaranteed way
to recover. For example, if you were reading typed input from a terminal, I
think the faulting read may consume some of the characters.
One other observation about latency:
Depending on your application, hash synchronization may also have a
substantial effect, since it allows pointerfree objects. Currently that's
supported only on some Linux platforms in 3.1. But it shouldn't be a major
porting effort. It also currently doesn't apply to pointerfree classes
implemented in Java, such as java.math.Integer, but it could.
Hans
More information about the Java
mailing list