Hi all,

I found one gotcha with using a pre-allocated OutOfMemoryError : if several 
threads throw OOME at the same time, the stack traces can get mixed up.  So 
thread A creates a structure, thread B overwrites A's pointer, and then 
whatever happens next will be bad news.

This situation is less improbable than you might think, since if one thread 
encounters an OOM situation, all other threads should encounter one too.  
With some forms of co-operative multi-threading you may get away with it, but 
in the general pre-emptive case you could be living dangerously.

-- 
Chris Gray                                  /k/ Embedded Java Solutions
Embedded & Mobile Java, OSGi              http://www.kiffer.be/k/
[EMAIL PROTECTED]                                      +32 3 216 0369


_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath

Reply via email to