-XX:PermSize and MaxPermSize

N

ninjazombiee

Hi all,

what do these parameters mean - PermSize ans MaxPermSize and how do
they relate to -Xmx (maximum heap size of JVM)?

Thanks.
 
D

Dave Miller

Hi all,

what do these parameters mean - PermSize ans MaxPermSize and how do
they relate to -Xmx (maximum heap size of JVM)?

Thanks.
Permanent generation (MaxPermSize setting) is separate heap space that
is not garbage collected (ergo the permanent). Whatever is allocated to
perm is in addition to the heap set with -Xmx.
 
N

ninjazombiee

Permanent generation (MaxPermSize setting) is separate heap space that
is not garbage collected (ergo the permanent). Whatever is allocated to
perm is in addition to the heap set with -Xmx.

Thanks,

do you think that a insufficiency in that Perm space could also cause
java.lang.OutOfMemoryException?
 
N

ninjazombiee

Permanent generation (MaxPermSize setting) is separate heap space that
is not garbage collected (ergo the permanent). Whatever is allocated to
perm is in addition to the heap set with -Xmx.

Is it possible that the wrong setting of PermSize could also cause
java.lang.OutOfMEmoryException?

Thanks!
 
J

Jim

Is it possible that the wrong setting of PermSize could also cause
java.lang.OutOfMEmoryException?

Thanks!

Yes, if so go higher, especially if you have quite a few
projects open in the workspace.

Many times you'll get a popup indicating that PermGen was the reason,
sometimes not. Save early, save often!

Jim
 
D

Dave Miller

Thanks,

do you think that a insufficiency in that Perm space could also cause
java.lang.OutOfMemoryException?
Yes, but it should indicate PermGen meaning that the system tried to
move something into the perm heap and there was no room. If you are
getting a garden variety OOM message it's more likely in the main heap.

It's pretty easy to test, set one way down and the other way up and see
what happens.
 
Joined
Jan 12, 2011
Messages
2
Reaction score
0
local references to Thread

I haven't seen the dreaded PermGen (knock on wood) since I took care to null any local reference to a Thread, though it seems ridiculous:

public void method {
Thread dt= new MyThreadClass();
dt.start();
...
dt=null;

}

Is it possible there's a bug in the GC.
 
Joined
Jan 12, 2011
Messages
2
Reaction score
0
local references to Thread

I haven't seen the dreaded PermGen (knock on wood) since I took care to null any local reference to a Thread, though it seems ridiculous:

public void method {
Thread dt= new MyThreadClass();
dt.start();
dt=null; // before you leave

}

Is it possible there's a bug in the GC?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top