R
Rune
I have a JAVA program with a number of threads, which when I run it on my
Mac (JAVA 1.3) runs flawlessly. It used to do so too on my Linux (JAVA 1.5)
but now it's starting to report a number java.lang.OutOfMemory: heap - even
though the Linux machine has the same amount of RAM as the Mac. Also I've
tried to catch the exception to pinpoint exactly where the exception is
thrown, but so far been unable. Is it not possible to catch
java.lang.OutOfMemory exceptions? And the exception doesn't print a stack
trace - merely OutOfMemory: heap size.
I've tried to change the -Xmx parameter, up to -Xmx512m, but without any
noticeable difference. But when I scale down the number of threads from 20
to 2 on the Linux the exceptions is apparently not thrown.
Why this big difference and how do I find out what exactly throws the
exception and eats all my memory?
Mac (JAVA 1.3) runs flawlessly. It used to do so too on my Linux (JAVA 1.5)
but now it's starting to report a number java.lang.OutOfMemory: heap - even
though the Linux machine has the same amount of RAM as the Mac. Also I've
tried to catch the exception to pinpoint exactly where the exception is
thrown, but so far been unable. Is it not possible to catch
java.lang.OutOfMemory exceptions? And the exception doesn't print a stack
trace - merely OutOfMemory: heap size.
I've tried to change the -Xmx parameter, up to -Xmx512m, but without any
noticeable difference. But when I scale down the number of threads from 20
to 2 on the Linux the exceptions is apparently not thrown.
Why this big difference and how do I find out what exactly throws the
exception and eats all my memory?