在介绍GC之前有必要先了解一下JVM的内存划分,这样在后面介绍GC和各种不同的GC collector的时候更容易理解。
下面这张图是“偷”的别人的,很经典的描述了jvm的体系结构,我们只需要关注最大的那一块——运行时数据区域。
1.方法区
方法区为各个线程共享的一块内存区域,当虚拟机装载一个class文件时,它会从二进制数据中解析类型的信息,包括类的静态变量也会存储到该区域。虚拟机...
分类:
其他好文 时间:
2015-03-07 01:00:39
阅读次数:
276
Java垃圾回收的步骤:
标记(Marking)
垃圾回收器标记堆中的对象,哪些依然被引用,哪些不再被引用。
2. 删除(Deleting)
删除不再被引用的对象
3. 压缩(Compacting)
压缩依然被引用的对象,使空闲的堆空间连接在一起,以便加快后续的空间申请
若每一次垃圾回收器在标记过程中,将堆中的对象逐个遍历并对依旧使用的对象进行压缩...
分类:
编程语言 时间:
2015-03-06 15:53:31
阅读次数:
194
报错如下:在ESXi“192.168.65.18”上调用对象“ha-property-collector”的“PropertyCollector.CreateFilter”失败。故障原因:192.168.65.18这个IP地址被人占用了!!坑啊!
分类:
其他好文 时间:
2015-03-04 19:20:26
阅读次数:
2127
1 #include 2 #include 3 #include 4 #include 5 #include 6 char maze[8][8]; 7 int n, m, t; 8 int mx, my, X, Y; 9 int flag, tt;10 int Move[4][2]= {...
分类:
其他好文 时间:
2015-03-04 15:56:08
阅读次数:
152
Problem Description:
The doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, and the doggie could feel the ground sinking. He...
分类:
其他好文 时间:
2015-03-02 19:07:09
阅读次数:
178
概率DP/数学期望/状压DP/容斥原理 kuangbin总结中的第14题 好神奇的做法……题解看kuangbin的代码好了…… 1 //HDOJ 4336 2 #include 3 #define rep(i,n) for(int i=0;i=n;--i) 6 const int N=22; 7.....
分类:
其他好文 时间:
2015-02-27 11:37:19
阅读次数:
143
ZOJ Problem Set - 2110Tempter of the BoneTime Limit: 2 Seconds Memory Limit: 65536 KBThe doggie found a bone in an ancient maze, which fascinated h...
分类:
其他好文 时间:
2015-02-26 19:59:39
阅读次数:
147
Problem Description
The doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, and the doggie could feel the ground sinking. He ...
分类:
其他好文 时间:
2015-02-25 09:11:35
阅读次数:
172
题目:Tempter of the BoneTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1134 Accepted Submission(s): 379 Problem DescriptionThe doggie found a bone i...
分类:
其他好文 时间:
2015-02-24 13:49:52
阅读次数:
156