• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 713
  • Last Modified:

Default max memory heap size

Hey experts,

  Can I know what is the default maximum memory heap size for the JVM (i.e. if I didn't use the -Xmx option to specify it explicitly), I couldn't see a place where this is specified..any help??
0
mte01
Asked:
mte01
3 Solutions
 
Mayank SAssociate Director - Product EngineeringCommented:
I think it varied from platform to platform:

http://java.sun.com/j2se/1.5.0/docs/guide/vm/gc-ergonomics.html
0
 
Mayank SAssociate Director - Product EngineeringCommented:
From that link:

"maximum heap size: Smaller of 1/4th of the physical memory or 1GB. Before J2SE 5.0, the default maximum heap size was 64MB."
0
 
mte01Author Commented:
>>mayankeagle

Thanks for the link!...I said in a document that 256 MB should be enough...even when very large files are being processed...but I couldn't support my claim....any help on how to support my claim (if it's acceptable)??
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Onyx23Commented:
Check out this link:

http://java.sun.com/docs/hotspot/gc/

Check out the 'Total heap' paragraph

(By default, the JVM grows or shrinks the heap at each collection to try to keep the proportion of free space to living objects at each collection within a specific range. )
0
 
hoomanvCommented:
even you can reduce the memory usage more, by applying an algorithm that does not need to load the entire file into memory in order to process it. for example you can load data from file partialy, usually in small chunks, and process each chunk separately, then store the processed data somewhere else (in another file), and at last combine all processed data into one large file, without the need to consume the memory at all.
0
 
Mayank SAssociate Director - Product EngineeringCommented:
>> I said in a document that 256 MB should be enough...even when very large files are being processed

The file size should be lesser than that, I guess, if you are loading all of it into a buffer in the memory. Otherwise keep flushing/ clearing the buffer. Make sure there is enough page-spacing available.
0
 
mte01Author Commented:
>>mayankeagle

I see...thx for your help!
0
 
Mayank SAssociate Director - Product EngineeringCommented:
:-)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now