Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JVM heap size limit under Windows

 
Tom Martin
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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
app.

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?

Thanks!
-tom
 
Joachim Rohde
Ranch Hand
Posts: 433
Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Tom Martin
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks!
I'll post back after some experiementing.

-tom
 
Joachim Rohde
Ranch Hand
Posts: 433
Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Out of curiosity: any results?
 
Tom Martin
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Joachim Rohde wrote:Out of curiosity: any results?


Sorry, no.

Between /3G switches and changing JVMs,
Boss decided to live with the 2G limit after all, so the priority has dropped.

Off-project time is sparse....
 
Ireneusz Kordal
Ranch Hand
Posts: 423
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tom Martin wrote:
Joachim Rohde wrote:Out of curiosity: any results?


Sorry, no.


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.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic