Except for calling directly System.gc Outside , Trigger Full GC There are four types of implementation :

1. There is not enough space in the old age

The space of the old age can only be transformed and created as large objects in the new generation 、 When the array is large, the shortage will appear , When executed Full GC There is still not enough space behind , Throw out java.lang.OutOfMemoryError:Java heap space

2.Permanet Generation Space is full

Permanet Generation Some of them are stored in class Information , When the class to be loaded in the system 、 When there are many reflected classes and called methods ,Permanet Generation May be full of , When not configured to use CMS GC In the case of Full GC. If passed Full GC Still can't recycle , that JVM I'll run out java.lang.OutOfMemoryError:PermGen space

3.CMS GC When promotion failed and concurrent mode failure

To adopt CMS Carry on the old generation GC The program , Pay special attention to GC Is there any  promotion failed  and  concurrent model failure  Two conditions , When these two conditions occur, it may trigger Full GC.  promotion failed It's going on MinorGC when ,survivor space can't let go 、 The object can only be put into the old generation , At this time, the old generation can't let go of the ; concurrent mode failure It's execution CMS GC In the process, objects are put into the old generation at the same time , And at this time, the lack of space for the elderly caused . Countermeasures : increase survivor space、 Old age space or lower trigger concurrency GC Ratio of , But in JDK5.0+、JDK6.0+ It may be due to JDK Of bug Lead to CMS stay remark It's long after it's over sweeping action . For this situation , By setting -XX:CMSMaxAbortablePrecleanTime=5( Company ms) To avoid

4, Statistics get MinorGC The average size of promotion to the old age is larger than the remaining space of the old age

This is a more complex trigger situation ,Hotspot In order to avoid the phenomenon of insufficient space in the old age due to the promotion of new generation objects to the old age , It's going on MinorGC when , Made a judgment , If the previous statistics show that MinorGC The average size of promotion to the old age is larger than the remaining space of the old age , So go straight ahead Full GC.

JVM- Trigger Full GC More related articles about the situation of

  1. Trigger JVM Conduct Full GC How to deal with it

    Heap memory is divided into Eden.Survivor and Tenured/Old Space , As shown in the figure below : From young generation space ( Include Eden and Survivor Area ) Reclaiming memory is called Minor GC, For the elderly GC be called M ...

  2. Trigger Full GC The timing of

    because Full GC Time consuming is Minor GC About ten times of , therefore Full GC It's designed to be more frequency efficient than Minor GC Much lower . Now to sum up Full GC The situation of . In those countries that have achieved CMS In a relatively new virtual machine , If the -X ...

  3. Trigger Full GC Implementation

    Except for calling directly System.gc Outside , Trigger Full GC There are four types of implementation . 1. There is not enough space for the old generation The old generation space is only transferred into and created as large objects in the new generation . Large array will be insufficient , When executed Full GC The back space is still ...

  4. GC A third --GC Trigger Full GC Implementation and coping strategies

    1.System.gc() Method call The call to this method is recommended JVM Conduct Full GC, It's just advice, not certainty , But in many cases it triggers Full GC, To increase Full GC The frequency of , That is to say, the number of intermittent pauses is increased . ...

  5. Trigger Full GC Implementation And other supplementary information

    Except for calling directly System.gc Outside , Trigger Full GC There are four types of implementation .1. The space of the old generation is insufficient. The space of the old generation can only be transferred and created as large objects in the new generation . Large array will be insufficient , When executed Full GC There is still not enough space behind ...

  6. GC Of the eight --GC Trigger Full GC Implementation and coping strategies

    Catalog : GC One of --GC The algorithm analysis of . Garbage collector . Introduction to memory allocation strategy GC The second --GC Log analysis (jdk1.8) Sorting GC A third --GC Trigger Full GC Implementation and coping strategies gc Of the four --Minor G ...

  7. java Trigger full gc Overview of several situations of

    Preface Recently asked this question , Here's the record . System.gc() Method call The call to this method is recommended JVM Conduct Full GC, It's just advice, not certainty , But in many cases it triggers Full GC, To increase Full ...

  8. JVM memory management ------GC Algorithm solution ( Five minutes to teach you the ultimate algorithm --- Generational collection algorithm )

    introduction What is the ultimate algorithm ? In fact, it is now JVM Algorithm used , Not really the ultimate . Maybe years from now , There will be new ultimate algorithms , And it's almost certain that there will be , because LZ Believe in the ability of the high people . So how does the generational collection algorithm deal with GC What about ? Object points ...

  9. JVM structure 、GC Details of working mechanism

      JVM structure . Memory allocation . Garbage collection algorithm . Garbage collector . Let's take a look at one by one . One .JVM structure according to <java Virtual machine specification > Regulations ,JVM The basic structure of is generally shown in the figure below : You can see from the picture on the left ,JVM It mainly includes four parts ...

  10. JVM structure 、GC Details of working mechanism ( turn )

    Original address :http://blog.csdn.NET/tonytfjing/article/details/44278233 JVM structure . Memory allocation . Garbage collection algorithm . Garbage collector . Let's take a look at one by one . One .JV ...

Random recommendation

  1. PHP Design patterns ( 7、 ... and ) Adapter pattern (Adapter For PHP)

    Adapter pattern : Convert the interface of one class to another that the customer wants , Enables classes that would otherwise not work together because of incompatible interfaces to work together . Here's the picture ( Borrow a picture ): // Set the interface of the book // Book interface interface BookI ...

  2. WDM Driver loading mode understanding

    When PC When I learned that a new device was plugged in , The bus driver creates the corresponding physical driver PDO, And then prompt for a new device to plug in , In this case, call the corresponding Driver Of AddDevice Method to create a function driver FDO Here is a typical AddDevice Method #pr ...

  3. For from the Azure Remote connection file for (.rdp) Another convenient way to customize

    In the last log ( I'm sorry for the black screenshot ) How to get Azure Medium Windows Remote connection file for virtual machine , And a method of customization based on text editing . In fact, it's very important for Windows For the users under , We can use ...

  4. Oracle Redo Log

    http://blog.itpub.net/27039319/viewspace-2120623/ 11.2 and 11.2 The following differences :http://blog.itpub.net/27039319/view ...

  5. Why set up getter and setter?

    In object-oriented language , Usually set the property to private , Then add getter and setter Method to access . Some people say , This is essentially the same as setting the property to be public , Just put the attributes public Forget it . Some people argue that , This destroys the encapsulation . however , Broke the package ...

  6. According to the linked list of storage location data P Print linked list L The elements of

    subject : Given a linked list L And another linked list P, They contain integers in ascending order . operation printLots Print L Those in the book are made up of P The element at the specified position . Write the process printLots(L,P). You can only use public STL Container operation . The process of ...

  7. rm The delete command

    linux The command to delete files and directories in : rm command .rm It's a common command , The function of this command is to delete one or more files or directories in a directory , It can also delete a directory and all its files and subdirectories . For linked files , Just deleted the link , The original ...

  8. Safe deletion mysql binlog journal

    Execute at the command line show binary logs; purge binary logs to 'mysql-bin.000070';

  9. Markdown Instructions

    Instructions ========= @[ manual | help |Markdown] - ** Mark flying elephant ** It's designed for impression notes Markdown Editor . - In particular, it needs to be noted that `@( The notebook )[ label ]` grammar , In this way ...

  10. install nginx Creation error

    ./configure: error: the HTTP gzip module requires the zlib library. solve : yum install -y zlib-devel -- ...