This is the mail archive of the mailing list for the Java project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Precise GC (was Re: cannot build libjava/gnu/gcj/xlib/

Cedric Berger wrote:
> 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.

You can hedge against it somewhat, keeping in mind that stack and register use
can be short-lived.  Our application runs 24x7 too, the difference is we have a
GB of memory.  But to avoid various resource leaks, worker threads are
periodically recycled, followed by a gc().  Provided that java.lang.Thread has
no resource leaks, memory usage quickly reaches a plateau.

We do occasionally have trouble with misbehaving threads.  If a thread becomes
unresponsive, we invoke interrupt() first, then stop() if necessary.

Too bad Thread.stop is deprecated by Sun, and libgcj doesn't implement it
(contradicting the remark in  I consider this a serious flaw in

Jeff Sturm

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]