Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
141 views
in Technique[技术] by (71.8m points)

java - Method Area and PermGen

I was trying to understand the memory structure of HotSpot JVM and got confused with the two terms "Method Area" and "PermGen" space. The docs I referred to say that Method Area contains the definition of classes and methods including the byte code. Some other docs say that they are stored in the PermGen space.

So can I conclude that these two memory areas are same?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You should take a look at Java Memory Types and optionally at this doc about the Garbage Collection in Java. The latter is very verbose and both are useful.

Actually the Method area is a part of the Permanent Generation:

A third generation closely related to the tenured generation is the permanent generation. The permanent generation is special because it holds data needed by the virtual machine to describe objects that do not have an equivalence at the Java language level. For example objects describing classes and methods are stored in the permanent generation.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...