[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Query on stacktrace management logic
From: |
Steven Augart |
Subject: |
Re: Query on stacktrace management logic |
Date: |
Tue, 02 Mar 2004 00:58:10 -0500 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113 |
David Holmes wrote:
Chris Gray wrote:
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.
This is one of our issues too.
Here's our approach:
if (VM.debugOOM || Options.verbose >= 5)
VM.sysWriteln("triggerCollection(): About to try \"new
OutOfMemoryError()\"");
MM_Interface.emergencyGrowHeap(512 * (1 << 10)); // 512K
should be plenty to make an exn
OutOfMemoryError oome = new OutOfMemoryError();
MM_Interface.emergencyGrowHeap(- (512 * (1 << 10)));
if (VM.debugOOM || Options.verbose >= 5)
VM.sysWriteln("triggerCollection(): Allocated the new
OutOfMemoryError().");
throw oome;
Of course, we have the advantage of not targeting the embedded space.
--Steve Augart
--
Steven Augart
Jikes RVM, open source Research Virtual Machine:
http://oss.software.ibm.com/jikesrvm
Office: +1 914/784-6743
T.J. Watson Research Center, IBM