• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

about permanent generation ?

 
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
author
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ?
 
reply
    Bookmark Topic Watch Topic
  • New Topic