Strange Java issue -- program quits after 370megs of memory usage...

E

eftal

Hello,

I have a memory heavy JAVA program that I invoke from a wrapper
program. The wrapper program is written in VC++, and it monitors
multiple JAVA processes (Lets call it MONITOR).

MONITOR calls a batch script in NT, which than calls the Java.exe --
with setting -Xmx 1536

The java program loads a COM object which caches a bunch of data.
During this caching process, the program will quit unexpectedly as soon
as it reaches more than 370MB of memory. The COM object throws an
unknown exception.


HEre are the weirdities:

If I run the batch script alone, (without the MONITOR) everything
works. However, it is using less memory (270MB) while caching the COM
object.

Additionally, if I set -Xmx 1036, the program works. Both with MONITOR
and using the straight batch.

This is the weirdest thing I ever saw. -XMX sets the maximum heap
size...why does the program work with less HEAP size? And why does
java.exe take less memory when its executed out of MONITOR.

Any help is appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top