Java memory area method area from JVM zero foundation to advanced actual combat

Java memory area method area from JVM zero foundation to advanced actual combat

Java memory area method area from JVM zero foundation to advanced actual combat



foreword

Java memory area method area from JVM zero foundation to advanced actual combat


JAVA method area of ​​JVM memory model

  • What is the JAVA method area?
    • It is a memory area shared by each thread. It is used to store data such as class information, constants, static variables, and code compiled by the instant compiler that have been loaded by the virtual machine.
    • What is class information: class version number, method, interface
  • Why is there a JAVA method area?
    • Data such as class information and static variables are stored in the memory, which belongs to an area shared by threads
    • Hotspot uses permanent generation to implement method area JRockit and IBM J9VM Java heap to manage this part of memory
  • What are the characteristics of the JAVA method area?
    • It is not that the data enters the method area and exists "permanently" like the name of the permanent generation. The goal of memory recovery in this area is mainly for the recovery of constant pools and the unloading of types
    • When it cannot meet the memory allocation requirements, the method area will also throw OutofMemoryError.

Summarize

This article introduces all the content of JVM zero basics to advanced practical Java memory area method area. I will continue to update it in the future. If you like it, please click to follow. The JVM series will continue to be updated.

Guess you like

Origin blog.csdn.net/weixin_42397937/article/details/131156045