This is the mail archive of the
mailing list for the Java project.
Re: Precise GC (was Re: cannot build libjava/gnu/gcj/xlib/natClip.cc)
Jeff Sturm wrote:
> Cedric Berger wrote:
> > In embedded systems, predictability it the top requirement. And I
> > don't see how to get predictable results without a precise GC.
> In that environment, is the real concern pointer misidentification, heap
> fragmentation or both?
Well, both are bad, but pointer misidentification is clearly the worst:
Fragmentation append with C code too, but you can workaround it by
1) preallocating/recycling most of the big objects.
2) keeping for example a 20% margin on the heap, and testing extensively.
Pointer misidentification, on the other end, is completely unpredictable:
you can test your device for ours in your lab, and it will work all the
time. But it will suddenly fail when a customer decide to, say, use
123.234.345.102 as the device IP address, and that IP address (stored as
an int somewhere) matches the memory address of a big object tree that
must be GC'd.