How can I see which garbage collector java is using

前端 未结 7 495
离开以前
离开以前 2020-12-10 03:26

The Java Virtual Machine supports several garbage collection strategies.

This article explains them.

Now I am wondering which (automatically selected) strat

7条回答
  •  醉梦人生
    2020-12-10 04:22

    Best way to get this is : Go to command Line and enter the following command.

    java -XX:+PrintCommandLineFlags -version

    It will show you result like :

    C:\windows\system32>java -XX:+PrintCommandLineFlags -version
    -XX:InitialHeapSize=132968640 -XX:MaxHeapSize=2127498240 -XX:+PrintCommandLineFl
    ags -XX:+UseCompressedClassPointers -XX:+UseCompressedOops -XX:-UseLargePagesInd
    **ividualAllocation -XX:+UseParallelGC**
    java version "1.8.0_66"
    Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
    Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)`enter code here`
    

提交回复
热议问题