当前位置:网站首页>The relationship between method area, perpetual generation and meta space
The relationship between method area, perpetual generation and meta space
2022-07-23 13:14:00 【Jinqingze】
What is the method area 、 Forever 、 Meta space
as everyone knows , Method area Is a very important part of the runtime data area , Is used to store class information 、 Constant pool 、 Method data 、 Code compiled by the compiler in time .
Forever yes jdk1.7 A previous landing implementation of the method area , In the heap , Used to store class information and string constant pool , Also contains SE Library classes and methods . stay jdk1.7 Move the string constant pool from the permanent generation to the heap , For ever jdk8 Removed .
Meta space Similar to the permanent generation , It is a landing implementation of the method area , The data stored in it is much purer than the permanent generation , It's the metadata of the class . The location of the meta space does not exist in the virtual machine , It's in local memory .
Why replace permanent generation with meta space
The disadvantages of the permanent generation
- It takes up the space of the heap
- The permanent generation space is too large and takes up too much heap memory , Too small, limited storage information
- Permanent GC It will trigger the heap GC
Why can it be designed like this before ?
At that time or 32 It's a plane , And I can't see clearly , Up to now 64 It's a plane , The disadvantages are exposed .
Meta space solves the problem of permanent generation ,jdk1.8 Start to replace permanent storage information
Problems in meta space
Meta space is allocated according to class loader , That is, the class loader loads a class , The meta space allocated to this class is actually allocated to the class loader , Different class loaders occupy different spaces , They do not share class information , If there are a lot of classloaders in the program , And they load very few classes , Then it may cause a lot of space waste .
Space separation for a long time may also cause memory space fragmentation .
边栏推荐
- 问题解决:Script file ‘Scripts\pip-script.py‘ is not present.
- HCIA----05 RIP
- How to prevent repeated payment of orders?
- 方法区、永久代、元空间的关系
- 【JZOF】10斐波那契数列
- 【离线语音专题④】安信可VC离线语音开发板二次开发语音控制LED灯
- 互联网时代下,如何精细化用户运营?
- 信號完整性(SI)電源完整性(PI)學習筆記(三十二)電源分配網路(四)
- Rhcsa - - parcourir le contenu du fichier, couper, uniq, trier, utiliser les commandes.tr
- 虚拟内存技术的来龙去脉(上)
猜你喜欢

Three layer switching configuration example learning record

动态RIP配置

OSPF multi area configuration instance learning record

Step on the electric render process renderer to solve the problem of require is not defined

在GPU上运行MATLAB程序

【JZOF】10斐波那契数列

Intégrité du signal (si) intégrité de l'alimentation électrique (PI) notes d'apprentissage (32) Réseau de distribution d'énergie (4)

课程设计-推箱子C#(win form)

JVM详细解析

Telnet configuration instance learning record
随机推荐
Static route configuration instance learning record
Li Kou 729. My schedule I
【JZOF】12矩阵中的路径
雷达导论PART VII.4 SAR系统设计
沟通绩效业绩不佳的 11 个提示
Es common operations
tar、sftp、fin的、history命令,变量、别名
Desensitize data
VLAN configuration instance learning record
HCIA----02
【JZOF】09用两个栈实现队列
RHCSA--文件内容浏览、cut、uniq、sort、.tr命令使用
当输入网址后,到网页显示,期间发生了什么
雷达导论专栏总目录
FTP configuration instance learning record
STP configuration instance learning record
Summary of time complexity( Ο Is the asymptotic upper bound, Ω is the asymptotic lower bound, P, NP, NP hard, NPC problem)
机器学习:李航-统计学习方法(二)感知机+代码实现(原始+对偶形式)
DHCP configuration instance learning record
Helm installing rancher