File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

about permanent generation ?

 
Anto Telvin
Ranch Hand
Posts: 113
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all
i want to know what is permanent generation ? what is the use of it in java ? what all the things that can be stored in permannet generation ? It is a part of what?
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,

I think you are referring to Perm Gen yes? See this discussion.
 
Anto Telvin
Ranch Hand
Posts: 113
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

in that link it is said that whatever classes are loading it will store in the permanent generation .but all the variables and methods are stored in heap /stack .why is it so ? why can't we store all the things in permanent generation .the entire class or just a class defenition is sored in permanent generation
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because variables and methods are things that typically fall out of scope and we want them to be garbage collected. Class definitions are something that can be 'sensibly' (YMMV) kept around permanently as they'll be referenced throughout the lifespan of the application.
 
Henry Wong
author
Marshal
Pie
Posts: 20836
75
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The perm generation is an implementation detail of the heap. Some JVMs don't even have it -- as the objects just go into the tenured generation instead.

Developers are not supposed to know/care about this. It is the heap. Why do you care if it is in the young, old, or perm generation?

Henry
 
Anto Telvin
Ranch Hand
Posts: 113
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
nope actually i encountered this question in an interview. that day only i came to know about that there is something called permanent generation.
the actuall question is what is PG and what are inside that ?where static variables are going to store all these ?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic