I found that trying in a debugger is not a good
idea - as the memory gets used up faster! and things
stop working.

Use the  -XX:+HeapDumpOnOutOfMemoryError option for
java (in ANT_OPTS) and get the heap dump when the program
terminates.

Another option is to get a heap dump always, something
like -Xrunhprof:file=dump.hprof,format=b.


Load the heap dump into your favorite heap dump analyzer,
and look at the largest retained objects.

I found that the yourkit profiler was excellent at this.
http://www.yourkit.com/changes/index.jsp#memory

Peter

On 6/21/07, Steve Loughran <[EMAIL PROTECTED]> wrote:

the big smartfrog build is suddenly oom-ing, on windows only, more often
on java1.6 but now on java1.5 too.

we're using ivy to choreograph, running threads for functional testing.
javac, rmic, junit, all are set to fork, but still we run out of memory
after about 40 minutes into the full build/test. All is well on unix,
but not windows.

Anyone got any ideas? What's the best way to debug this? I've never
profiled a build before. We could maybe have a new listener that prints
out memory/heap space status as it exits projects, a profiling
listener...then there is the profilers under netbeans and the
java1.5/1.6 memory tools.

-steve

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to