File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Heap size for JVM 1.6

 
Baiju Scariah
Ranch Hand
Posts: 33
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

Can someone please let me know what is the default minimum and maximum heap size for JVM, if -Xms and –Xmx are not specified in Windows and Solaris environment?

I am using jre1.6 on Windows VISTA, XP environments

I am using jre1.6 on Solaris 10

Thanks,
Baiju S
 
Bob Wheeler
Ranch Hand
Posts: 317
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I can give you code to get your default and max heap size:


I hope that helps a little bit and I hope that's correct lol.
cheers
Bob
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Pie
Posts: 15150
31
Android IntelliJ IDE Java Scala Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This question does not have anything to do with the SCJP exam. I will move it to a more appropriate forum for you.
 
Ryan Anderson
Greenhorn
Posts: 21
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in case anyone wanted to change there heap size @ runtime....

http://javahowto.blogspot.com/2006/06/6-common-errors-in-setting-java-heap.html
 
Campbell Ritchie
Sheriff
Pie
Posts: 47228
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should find your ways round the official Java™ documentation: look for the java tool and also look for the "ergonomics" link. You see it appears to vary from computer to computer.
 
Baiju Scariah
Ranch Hand
Posts: 33
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks to all for the update.

But, I am interested in knowing is there a default value for -Xmx. In other words, if we don't specify anything at runtime, does java has any default value?

Thanks
Baiju S
 
Rob Spoor
Sheriff
Pie
Posts: 20369
44
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes - 64MB. Which you could have found by searching.
 
Baiju Scariah
Ranch Hand
Posts: 33
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.

Somehow, my search wasn't successful...

Baiju
 
Joanne Neal
Rancher
Pie
Posts: 3742
16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob Prime wrote:Yes - 64MB. Which you could have found by searching.


Actually, since Java 1.5, that's no longer true in all cases. See the ergonomics link that Campbell posted.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic