当前位置:网站首页>JVM memory model concept
JVM memory model concept
2022-07-06 14:22:00 【xmh-sxh-1314】
JVM The memory model is divided into virtual machine stack , Pile up , Method area , Program counter , Five parts of the local method stack .
Java The virtual machine stack is the same as the program counter ,Java Virtual machine stack (Java Virtual Machine Stacks) It's also thread private , It has the same life cycle as a thread .
Java Heap for most applications ,Java Pile up (Java Heap) yes Java The largest chunk of memory managed by a virtual machine .Java The heap is an area of memory Shared by all threads , Created when the virtual machine starts .
Method area (Method Area) And Java Pile up , Is an area of memory Shared by each thread , It is used to store class information that has been loaded by the virtual machine 、 Constant 、 Static variables 、 Real time compiler compiled code and other data .
Program counter (Program Counter Register) It's a small amount of memory , Its function can be seen
It is the line number indicator of the bytecode executed by the current thread .
Native Method Stack (Native Method Stacks) It's very similar to what the virtual machine stack does , The difference is that the virtual machine stack executes for the virtual machine Java Method ( That's bytecode ) service , The local method stack is used by the virtual machine Native Method service .
JVM The advantages of memory model
Built in memory based concurrency model : Thread mechanism
Synchronization lock Synchronization
A large number of thread safe library packages support
Memory based concurrency mechanism , Flexible granularity control , Flexibility is higher than database lock .
Multi core parallel computing model
Thread based asynchronous model .
边栏推荐
猜你喜欢
Hackmyvm target series (2) -warrior
Windows platform mongodb database installation
Intranet information collection of Intranet penetration (4)
强化學習基礎記錄
Hackmyvm target series (3) -visions
DVWA (5th week)
HackMyvm靶机系列(3)-visions
循环队列(C语言)
Harmonyos application development -- address book management system telmanagesys based on listcontainer [phonebook][api v6]
Package bedding of components
随机推荐
7-9 make house number 3.0 (PTA program design)
外网打点(信息收集)
Harmonyos JS demo application development
Uibutton status exploration and customization
JDBC事务、批处理以及连接池(超详细)
Hackmyvm target series (1) -webmaster
Network layer - simple ARP disconnection
[VMware abnormal problems] problem analysis & Solutions
Analysis of penetration test learning and actual combat stage
7-4 hash table search (PTA program design)
Record an edu, SQL injection practice
msf生成payload大全
The difference between layer 3 switch and router
Intranet information collection of Intranet penetration (I)
强化学习基础记录
WEB漏洞-文件操作之文件包含漏洞
Load balancing ribbon of microservices
Constants, variables, and operators of SystemVerilog usage
Attach the simplified sample database to the SQLSERVER database instance
Simply understand the promise of ES6