Java memory area program calculator from JVM zero foundation to advanced combat

Java memory area program calculator from JVM zero foundation to advanced combat

Java memory area program calculator from JVM zero foundation to advanced combat



foreword

Java memory area program calculator from JVM zero foundation to advanced combat


Program calculator for JVM memory model

  • What is a program calculator?

    • The program counter is a small memory space that can be seen as an indicator of the line number of the bytecode executed by the current thread
    • A thread is an independent execution unit that is executed under the control of the CPU
    • When the bytecode interpreter works, it selects the next bytecode instruction to be executed by changing the value of this counter. Basic functions such as branching, looping, jumping, exception handling, and thread recovery all need to rely on this counter to complete.
  • Why have a program calculator?

    • In order to return to the correct execution position after thread switching, each thread needs to have an independent program counter. The counters between threads do not affect each other and are stored independently. We call this type of memory area "thread-private" memory.
  • What are the features of the program calculator?

    • The only memory region that does not specify any OutOfMemoryError conditions

Summarize

This article introduces all the content of JVM zero basics to advanced actual combat Java memory area program calculator. 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/131154614