Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > Java Basics
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Java Basics General beginning Java language questions that don't fit in one of the more specific forums. Please specify what version.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 16th, 2009, 09:36 PM
Friend of Wrox
 
Join Date: Dec 2008
Location: , , .
Posts: 238
Thanks: 2
Thanked 20 Times in 19 Posts
Default specify heap and permgen size for jvm

When you start up jvm, you can specify heap size and PermGen size, for example '-Xms512m -Xmx1024m -XX:PermSize=384m -XX:MaxPermSize=512m".

Here is my question, heap consists three parts: young gen, old gen and perm gen so it sounds like, in the above case, max yound + max old + max perm should equal to 1024m. But when I read jstat -gccapacity, it seems like max young + max old = 1024m.

Cannot really find any document specifically answering my question, so any idea?
Reply With Quote
  #2 (permalink)  
Old June 17th, 2009, 07:50 AM
Friend of Wrox
 
Join Date: Mar 2007
Location: Hyderabad, A.P., India.
Posts: 373
Thanks: 0
Thanked 1 Time in 1 Post
Default

Yes, heap is young+old, PermSize is different. You can find little more info about it at the bellow given links
http://www.freshblurbs.com/explainin...-permgen-space
http://work.tinou.com/2009/04/java-c...ject-size.html

and a tool to check memory usage
http://java.sun.com/developer/techni.../jconsole.html

Hope it gives information you need.
__________________
- Rakesh
http://iam-rakesh.blogspot.com
Reply With Quote
  #3 (permalink)  
Old June 17th, 2009, 08:28 AM
Friend of Wrox
 
Join Date: Mar 2007
Location: Hyderabad, A.P., India.
Posts: 373
Thanks: 0
Thanked 1 Time in 1 Post
Default

I found some description about it at one url. Might help you understand about PermGen space

What is PermGen space anyways? The memory in the Virtual Machine is divided into a number of regions. One of these regions is PermGen. It’s an area of memory that is used to (among other things) load class files. The size of this memory region is fixed, i.e. it does not change when the VM is running. You can specify the size of this region with a commandline switch: -XX:MaxPermSize. The default is 64 Mb on the Sun VMs.
If there’s a problem with garbage collecting classes and if you keep loading new classes, the VM will run out of space in that memory region, even if there’s plenty of memory available on the heap. Setting the -Xmx parameter will not help: this parameter only specifies the size of the total heap and does not affect the size of the PermGen region.
__________________
- Rakesh
http://iam-rakesh.blogspot.com
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
lvalue/rvalue vs. stack/heap hkyoon BOOK: Beginning C# 3.0 : An Introduction to Object Oriented Programming ISBN: 978-0-470-26129-3 4 January 11th, 2009 11:17 PM
Heap of typing errors HELP!!! ours All Other Wrox Books 11 December 24th, 2007 11:23 AM
Heap Monitor pallavi11 VB How-To 5 January 11th, 2007 08:37 PM
Could not reserve enough space for object Heap overcit Apache Tomcat 0 February 23rd, 2006 12:11 PM
parameters to jvm uskiranj Servlets 0 May 28th, 2004 03:47 AM



All times are GMT -4. The time now is 01:15 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.