1

I am trying to understand how JVM's memory maps to that of the underlying Linux process.

Here is my understanding of JVM's memory architecture:

https://dl.dropboxusercontent.com/u/38889378/jvm_arch.jpg

Now the next diagram shows the mapping of memory when a JVM instance is scheduled over a Linux process.

https://dl.dropboxusercontent.com/u/38889378/OS_Process.jpg

Here I have taken the following assumptions:

  1. The JVM Stack is actually part of the Linux Process HEAP, and hence we can say all Java user program is held over the Linus Process HEAP.

  2. Linux Process Stack is used for Native Stack and also used by JVM's internal native procedure calls.

Please help me figure out if my assumptions are correct.

Please excuse me for putting up Image URL's, I don't have enough reputation to have them embedded. I am a new user, sorry for the inconvenience and thanks for all the help.

bitan
  • 444
  • 4
  • 14
  • Your Linux image cannot be completely correct. When using JNI, one can make use of both the stack and heap of the host process from within a jclass method. There is some overlap. Though i expect you're safe in the assumption that the old, new, and permanent generations are all stored in the heap. – Knetic Feb 13 '14 at 04:19
  • @Knetic Thanks for the answer, but how about the Java Stack and Program Counter, I assume that is also part of the Linux Process Heap. Is my assumption good on this. – bitan Feb 13 '14 at 13:16

0 Answers0