my dog learned polymorphism
The moose likes Performance and the fly likes Perm Space Vs  Heap Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Performance
Bookmark "Perm Space Vs  Heap" Watch "Perm Space Vs  Heap" New topic

Perm Space Vs Heap

kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1404
Heap is divided in to three areas: young generation, old generation and perm space. Whether perm space stores dynamically generated classes using reflection (eg: JAXB classes generation(UnMarshalling) using xjc binding compiler) ?
Paul Santa Maria
Ranch Hand

Joined: Feb 24, 2004
Posts: 236
Hi -

Ask your question a different way. Besides reading links describing how the Java heap is allocated, and how allocated objects are partitioned for later garbage collection, perhaps the BEST way to determine what's going on is to LOOK at your actual application and SEE which part of the heap things are winding up. For example:
jmap -permstat MYPID

Here's a good article you're probably already familiar with:

Here are some good, practical tips that might also be of interest:

But above all - if you don't already have JConsole and you're not already profiling your app with it - then start!


Paul M. Santa Maria, SCJP
kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1404
Hi Paul, Thanks for your links. What are the basic criteria(parameters) to tune the old generation, young generation and perm gen heap parameters ?
Peter Johnson

Joined: May 14, 2008
Posts: 5852

JBoss In Action
I agree. Here's the link:
subject: Perm Space Vs Heap
jQuery in Action, 3rd edition