views:

64

answers:

1

I have few questions regarding java GC and memory management.

In java we define process memory upper bound and lower bound by xmx and xms parameters. Using these parameters JVM allocates young old and perm space. So if new threads are created then from which memory do stacks memory is allocated to threads? is it from perm space or any other space?

Also static variables of class is allocated to which space young, old or perm space? (I guess perm?)

Does XmX paramenter bounds the young + old gen OR young + old+ perm gen OR young + old + perm + stack size ??

Thanks

+1  A: 

The thread stack space is controlled by another option -Xss. Here is a reference that might help you which is on this particular topic.

Sagar V
I know about -Xss flag. my question is : from where does memory allocated to thread using -Xss option come? or you can answer this question : Does XmX paramenter bounds the young + old gen OR young + old+ perm gen OR young + old + perm + stack size ?? If it does not include stack size then from where stack space is allocated?