I'm looking either for some help with a workaround, or
confirmation that the information I've found is still the case for the
current state of Java.
I've run into the Windows jvm heap limit problem.
Development machine is Win XP Pro, 2G RAM.
Biggest heap I can allocate is about 1.6G, and that is not large enough for this
I have a Swing application that
1) must run on Win XP, 32 bit
2) must implement an editor (similar to Excel but with fewer features) to handle large csv files
( up to about 800Mb).
3) Strong preference for Java 5, though higher could conceivably be supported.
Research so far tells me that this is the result of process memory limitations
of Windows and the JVM, and that I *might* be able to squeeze a little more heap with
Windows' rebase command, but probably not enough and I would start running the
risk of conflicts with other applications on my users' systems. Ugh.
Also I read of the Windows /3GB switch, but posts say that the JDK's available are not
built to be able to use that feature. I havent had a chance to add memory to
test that yet. However, I'm also under the impression that I should be able to
allocate a heap larger than physical RAM ... except for that process size limit.
So ... my information is basically that I'm stuck with a limit of about 1.6G for
heap size, regardless of the RAM on my computer.
Can anyone confirm whether that is still correct, preferably with a pointer to some
official reference ?
Or better yet, point me toward a workaround?
Never used it before but after a quick reasearch the JVM option "-XX:+AggressiveHeap " seems exactly what you are looking for. Have a look at http://java.sun.com/docs/hotspot/ism.html Let us know if this solves your problem.
Joachim Rohde wrote:Out of curiosity: any results?
32-bit windows even with 3GB switch can allocate maximum 2GB continuous block of memory for a single process.
JVM is a single process - it takes about 200-300MB from this 2GB, each individual thread requires 20-50MB stack space,
the rest is for the heap .... maximum 1600-1700 MB.
64-bit windows (Windows Server 2003 or above) or unix will solve your problem.