Rahul Matte
Rahul Matte

Reputation: 1181

How does DVM manage the memory when the compiled code get loaded in DVM?

When the Java byte code is loaded in JVM, the JVM divides the memory in the following sections

1.Heap

2.Stack

3.Code

4.Static

How the same take place in DVM? Please guide me to understand this.

Upvotes: 0

Views: 302

Answers (1)

Stephen C
Stephen C

Reputation: 718788

As far as I known, the DVM manages memory the same way as the JVM. Obviously, there will be some differences in the fine details, but if you understand one you should be able to understand the other.

However, your understanding is a little wrong ... with respect to the JVM. For HotSpot JVMs (at least), both code and statics (class frames) are allocated within the Heap. I understand that the permgen heap is used but that is heap space, and the space will be garbage collected under certain circumstances.

Upvotes: 1

Related Questions