当前位置:网站首页>Brief introduction to memory structure of virtual machine
Brief introduction to memory structure of virtual machine
2022-06-13 10:30:00 【edui】
There are many versions of this virtual machine , The most common one is HotSpot, I don't know God's situation download is this version . The approximate memory model is shown in the figure below .
Thread sharing is the same area of memory used by each thread , All threads are freely accessible . Thread isolation is unique to threads , Threads cannot be accessed together .
Method area
The memory threads in this area share , Used to save class information , Constant , Is a logical part of the heap , So garbage collection will also be recycled to . Wait for variables and other data ,1.7 There were string constants before HotSpot1.7 Transferred to heap after , therefore String.intern() Query whether the string exists in the virtual machine , Virtual machines with different methods may behave differently . stay HotSpot It is often called the permanent generation , Because this part of memory is also added to the recycling mechanism, but the conditions are more stringent ,Pile up
When I first saw it, I thought it had something to do with the data structure and the heap in the algorithm , However, heap memory management is not a heap data structure , Usually in the form of a linked list . This heap is just a heap of memory . It has nothing to do with the pile of hairs in the data structure . This memory stores the real columns of the object , Thread sharing . Generally, the object reference refers to this area .Local method stack and Java Virtual machine stack
These two are almost the same , In some virtual machines, the two are directly integrated , This area is thread private , Each method creates a stack frame as it executes ( The stack frame will be introduced later ), This stack frame is used to store the local variable table 、 The stack of operands 、 Dynamic links 、 Method exit information , The process of each method from call to execution , It corresponds to a stack frame in the virtual machine stack stack stack to the stack process . The local method is Java Method service ,Java The virtual machine method is native Method service ( It may be the method of other languages )Program counter
Thread private , Save the location where the program runs ( Instruction address ), Where it refers, it is executed , Change the value of the counter before executing the indicated code .
边栏推荐
猜你喜欢

China SaaS industry panorama

等个有“源”人|OpenHarmony 成长计划学生挑战赛报名启动

spark源码(一)spark-submit如何将jar以及配置参数提交给spark服务器

Smart210 uses SD card to burn uboot

Oracle custom data type question

Solution to qt5.12 unable to input Chinese (unable to switch Chinese input method) in deepin system

SQL Server创建windows登录账户找不到用户或组

Actual combat simulation │ real time error alarm of enterprise wechat robot

Record several interesting XSS vulnerability discoveries

IDEA 续命插件
随机推荐
QTcpServer. QTcpSocket. QUdpSocket之间的区别
deepin系统中Qt5.12无法输入中文(无法切换中文输入法)解决办法
MySQL monitoring tool PMM, let you go to a higher level (Part 2)
Système de gestion des défauts du projet Cynthia
Mobile web effects
Knowledge points of silicon steel sheet
23. Lottery
vivo大规模 Kubernetes 集群自动化运维实践
C Oracle multi table query
QTcpServer. QTcpSocket. Differences between qudpsockets
Memory management -- Viewing memory space from the perspective of executing programs and processes
冗余码题型--后面加0的区别
Classical convolutional neural network model
在 Kubernetes 集群上部署 VSCode
The first laravel workflow engine released the official version of v1.0
vivo大规模 Kubernetes 集群自动化运维实践
Redis初始安装和使用【玩转华为云】
知识图谱入门
实战模拟│企业微信机器人实时报错预警
2022煤矿探放水特种作业证考试题库模拟考试平台操作