java - Will GC run if permgen fills up? -


i have application on startup runs 2 or 3 full gc. there lot of heap space , there no need run gc(minor or full). on gc log, can see permgen getting filled , after full gc run.after this, there increase in permgen space. , once classes loaded, there no full gc more.

my question if permgen gets filled up, vm run gc claim memory heap , add memory permgen? or throw outofmemory-permgen?

my question if permgen gets filled up, vm run gc claim memory heap , add memory permgen? or throw outofmemory-permgen?

the gc run full gc in attempt free memory in permgen space. if fails free enough space, oome thrown saying permgen full.

no current or past hotspot jvms attempt increase permgen beyond prescribed limit, whether or not there normal heap space allow this.


the reasons full gc needs happen before oome (permgen) are:

  • there may have been references permgen objects in non-permgen space. running full gc checks this.
  • (afaik) gc'ing permgen tied full gc anyway ... presumably same reason. typically references normal heap , gc "roots" keep permgen objects reachable.

permgen objects (afaik) immutable, changes in reachability due permgen object mutation unlikely.


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -