美文网首页
JVM 架构 : 运行时数据区 & 内存结构

JVM 架构 : 运行时数据区 & 内存结构

作者: 光剑书架上的书 | 来源:发表于2021-08-19 00:46 被阅读0次

JVM : Java Virtual Machine 架构

JVM Architecture Runtime Data Area/Memory Structure

Classloader

Class loader is a subsystem in JVM, which is primarily responasible for loading the
java classes, there are 3 different class loaders :

  • Bootstrap Classloader is the super class loader, which primharily loads the rt.jar,
    which contains the java.lang, java.net, java.io, java.sql package classes

  • Extension Classloader is the sub of Bootstrap Classloader, it loads the library
    under JRE_HOME/lib/ext directory

  • System/Application Classloader is the sub of ExtenstionClassloader, it loads the
    classes from the classpath, specified using the java -cp comrmand.

We can also create our own classloader by extending the Classsloader class
Classloader is primarily performs three basic activities, in this order
Loading → Linking - Initialization

JVM 内存区域

Runtime Data Areas(Heap | Method Area | JVM Stacks | PC Register | Native Stacks)

JVM 堆内存区域 Heap

Heap 数据结构

METHOD AREA / PERMANENT

Created at JVM startup and shared among all threads like Heap.

Per Thread Runtime Data Areas : PC Register & Stack Frame

  • Local Variable Array
  • Operand Stack
  • Reference to Constant Pool

JVM Execute Engine

Interpreter

Interpreter is the one that reads the class files or bytecode and exectutes it
one by one. The problem with the interpreter is that, when a method is
called multiple times, it interprets those lines of bytecode again and again.

JIT compiler

JIT compiler helps in overcoming the problem of the interpreter. When
repeated method calls occur, JIT compiler compiles the bytecode to native
code. This native code will be used directly for repeated method calls .
JIT compiler contains few components to achieve this feature.

Java native method interface

It is responsible for interacting with native libraries and makes it avvailable for
the JVM execution engine.

相关文章

  • JVM 面试整理

    JVM 内存结构,运行时数据区各模块什么作用、存放什么数据 jvm 内存结构包含:heap堆区:负责存放所有的 对...

  • Java从入门到入坑(底层篇)

    01:JVM 1:JVM内存结构 class 文件格式、运行时数据区:堆、栈、方法区、直接内存、运行时常量池、 堆...

  • java面试jvm总结

    JVM→ JVM 内存结构运行时数据区:堆、栈、方法区、直接内存、运行时常量池、堆存放对象, 方法区他用于存储已被...

  • JVM内存模型和JVM内存结构的区别

    JVM内存模型与内存结构不是同一个概念,JVM内存结构是从运行时数据区的结构角度描述的概念,而JVM内存模型是从主...

  • 5.JVM层GC调优

    JVM与调优 imooc JVM Markdown JVM的内存结构 运行时数据区 程序计数器PC Regist...

  • JVM

    JVM结构 总体上JVM由类装载子系统、运行时数据区、执行引擎和内存回收系统组成。其中我们最关心的是运行时数据区,...

  • JVM运行时数据区(JAVA内存结构)

    JVM运行时数据区(JAVA内存结构) 以前一直对JVM内存结构不是很清楚,最近深入学习后为加深影响参考网上相关的...

  • JVM内存模型

    1.JVM组成部分 类加载器子系统 运行时数据区(内存结构,JVM内存模型) 执行引擎 2.图示 3.线程隔离数据...

  • 线程安全之可见性问题

    Java内存模型 VS JVM运行时数据区 首先Java内存模型(JMM)和JVM运行时数据区并不是一个东西,许多...

  • JVM Run-Time Data Areas & 参数相关

    jvm定义了各个运行时数据区: 运行时数据区: <=== 是一个规范,内存结构是一个实现1)部分运行时数据区域是在...

网友评论

      本文标题:JVM 架构 : 运行时数据区 & 内存结构

      本文链接:https://www.haomeiwen.com/subject/kaznbltx.html