Advertisement

03.06.2008 at 03:28PM PST, ID: 23221517
[x]
Attachment Details

Java Memory In Windows

Asked by connect3 in Java Programming Language

Tags: Jave, JRE, 1.5.0_11

java version "1.5.0_11"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode)

Windows 2003 Enterprise SP2/8GB of RAM

I am setting my memory heap using -Xms256m -Xmx1024m for our application.  If I try to set anything higher than 1024, i get this error:

Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.

After doing research, I have found this is limited by privvmpages and oomguarpages but all threads refer to a unix environment, and I have no idea how to find/set this info in a Windows environment.

When I run the app with 1024, the data import will run to the same place and then error out with this:

Exception error
com.microsoft.sqlserver.jdbc.SQLServerException: The system is out of memory. Use server side cursors for large result sets:Java heap space. Result set size:854,269,999. JVM total memory size:1,065,484,288.

I am pretty good with math and know that 1,065,484,288 > 854,269,999...

what gives?Start Free Trial
[+][-]03.06.2008 at 11:01PM PST, ID: 21067914

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Java Programming Language
Tags: Jave, JRE, 1.5.0_11
Sign Up Now!
Solution Provided By: sciuriware
Participating Experts: 1
Solution Grade: A
 
 
[+][-]03.07.2008 at 08:59AM PST, ID: 21072123

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.07.2008 at 10:14AM PST, ID: 21072818

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.07.2008 at 10:15AM PST, ID: 21072827

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628