- 浏览: 352373 次
- 性别:
- 来自: 南京
博客专栏
-
设计模式那些事儿
浏览量:5772
文章分类
- 全部博客 (85)
- news (3)
- java面试题 (3)
- java基础 (2)
- 英语短文 (2)
- 英语演讲 (2)
- Weekly Address (5)
- 英语写作 (2)
- 转载 (1)
- 2010 FIFA World Cup (5)
- Scrum (1)
- 计算机基础 (2)
- java引用对象 (1)
- 英语阅读 (1)
- Ext (6)
- Javascript (3)
- Web编程 (4)
- 战国策 (7)
- html (1)
- java (33)
- concurrency (1)
- jvm (31)
- 方法区 (9)
- 栈 (5)
- 堆 (1)
- 程序计数器 (1)
- 本地方法栈 (1)
- class file (5)
- 常量池 (2)
- attributes (1)
- 连接模型 (1)
- applet (1)
- gc (5)
- 垃圾收集 (5)
- 方法调用 (2)
- IBM (0)
- 门户(Portal) (0)
- Solr (1)
- Lucene (1)
- 全文检索 (1)
- 设计模式 (4)
- 责任链模式 (1)
- 责任链 (1)
- COR (1)
- Pattern (1)
最新评论
-
Nabulio:
是不错的
Java的Integer与int互转 -
shihengli2010:
学习了 !Integer i = 100; Integer ...
Java的Integer与int互转 -
flex涵:
还可以,差不多就是这个意思.
Java的Integer与int互转 -
lijingshou:
相当好用。。。
输入年月日格式yyyyMMdd,判断是否是周末 -
denverj:
你好,是这本书的英文版,名字叫<Inside the J ...
JVM学习笔记-帧数据区(Frame Data)
Generational Collectors
One disadvantage of simple stop and copy collectors is that all live objects must be copied at every collection. This facet of copying algorithms can be improved upon by taking into account two facts that have been empirically observed in most programs in a variety of languages:
简单的停止并拷贝收集器的缺点是,每一次收集时,所有的活动对象都必须被拷贝。大部分语言的大多数程序都有如下特点,如果我们认真考虑这些,拷贝算法的这个缺点是可以被改进的。
- Most objects created by most programs have very short lives.
- Most programs create some objects that have very long lifetimes.
A major source of inefficiency in simple copying collectors is that they spend much of their time copying the same long-lived objects again and again.
简单的拷贝收集器浪费效率的一个主要原因就是,它们每次都把这些生命周期很长的对象来回拷贝,消耗大量的时间。
Generational collectors address this inefficiency by grouping objects by age and garbage collecting younger objects more often than older objects. In this approach, the heap is divided into two or more sub-heaps, each of which serves one "generation" of objects. The youngest generation is garbage collected most often. As most objects are short-lived, only a small percentage of young objects are likely to survive their first collection. Once an object has survived a few garbage collections as a member of the youngest generation, the object is promoted to the next generation: it is moved to another sub-heap. Each progressively older generation is garbage collected less often than the next younger generation. As objects "mature" (survive multiple garbage collections) in their current generation, they are moved to the next older generation.
按代收集的收集器通过把对象按照寿命来分组解决这个效率低下的问题,更多的收集那些短暂出现的年幼对象,而非寿命较长的对象。在这种方法里,堆被划分为两个或者更多的子堆,每一个子堆为一“代”对象服务。最年幼的那一代进行最频繁的垃圾收集。因为大多数对象都是短促出现的,只有很小部分的年幼对象可以在它们经历第一次收集后存活。如果一个最年幼的对象经历了好几次垃圾收集后仍然存活,那么这个对象就成长为寿命更高的一代;它被转移到另外一个子堆中去。年龄更高的每一代的收集都没有年轻的那一些来的频繁。每当对象在它所属的年龄层(代)中变得成熟(逃过了多次垃圾收集)之后,它们就被转移到更高的年龄层中去。
The generational collection technique can be applied to mark and sweep algorithms as well as copying algorithms. In either case, dividing the heap into generations of objects can help improve the efficiency of the basic underlying garbage collection algorithm.
按代进行的垃圾收集除了可以应用于拷贝算法,也可以应用于标记并清楚算法。不管在哪种情况下,把堆按照对象年龄层分解都可以提高最基本的垃圾收集算法性能
发表评论
-
java书籍
2011-12-15 15:31 0线程 Java Concurrency in Pra ... -
JVM学习笔记-本地方法调用(Invoking a Native Method)
2011-11-25 11:56 1158Invoking a Native Method ... -
JVM学习笔记-调用Java方法(Invoking a Java Method)
2011-11-25 11:35 1514Invoking a Java Method As m ... -
JVM学习笔记-拷贝收集器(Copying Collectors)
2011-11-22 16:34 1604Copying Collectors Copy ... -
JVM学习笔记-压缩收集器(Compacting Collectors)
2011-11-22 16:17 1324Compacting Collectors G ... -
JVM学习笔记-跟踪收集器(Tracing Collectors)
2011-11-22 16:04 1910Tracing Collectors Trac ... -
JVM学习笔记-引用计数收集器(Reference Counting Collectors)
2011-11-22 15:46 2492Reference Counting Collect ... -
applet notinited的解决方案
2011-11-13 14:45 4520最近项目当中正好使用到了applet,这个很少接触过的东东。 ... -
JVM学习笔记-动态连接和解析(Dynamic Linking and Resolution)
2011-11-08 11:09 3436When you compile a Java pro ... -
JVM学习笔记-属性格式(Attributes Types)
2011-11-07 12:15 1483Attributes The Java Vir ... -
JVM学习笔记-属性(Attributes)
2011-11-07 12:03 1515Attributes As mentioned ... -
JVM学习笔记-方法(Methods)
2011-11-07 11:25 2222Methods Each method dec ... -
JVM学习笔记-字段(Fields)
2011-11-07 11:17 1909Each field (class variable a ... -
JVM学习笔记-特殊字符串(Special Strings)
2011-11-05 14:33 1669Special Strings 特殊字符串 T ... -
JVM学习笔记-Class文件(Class File)
2011-11-05 14:39 1591What is a Java Class Fi ... -
JVM学习笔记-本地方法栈(Native Method Stacks)
2011-11-02 10:16 19183本地方法栈(Native Me ... -
JVM学习笔记-帧数据区(Frame Data)
2011-10-28 09:16 1721In addition to the local var ... -
JVM学习笔记-操作数栈(Operand Stack)
2011-10-27 11:12 14085Like the local variables, th ... -
JVM学习笔记-局部变量区(Local Variables)
2011-10-27 10:42 2993The local variables secti ... -
JVM学习笔记-栈帧(The Stack Frame)
2011-10-27 10:35 2518The stack frame has three pa ...
相关推荐
jvm 调优笔记-jvm
Moonbox(月光宝盒)是JVM-Sandbox生态下的,基于jvm-sandbox-repeater重新开发的一款流量回放平台产品。在jvm-sandbox-repeater基础上提供了更加丰富功能,同时便于线上部署和使用,更多对比参考。 使用场景 你...
nginx-upstream-jvm-route 支持nginx版本1.15 解决nginx: [emerg] invalid parameter "srun_id=tomcat1" 问题
JVM调优总结 -Xms -Xmx -Xmn -Xss
赠送jar包:metrics-jvm-3.1.5.jar; 赠送原API文档:metrics-jvm-3.1.5-javadoc.jar; 赠送源代码:metrics-jvm-3.1.5-sources.jar; 赠送Maven依赖信息文件:metrics-jvm-3.1.5.pom; 包含翻译后的API文档:...
JVM性学习笔记-基本原理,内存模型,JVM参数设置,类加载器原理,JDK自带工具
赠送jar包:metrics-jvm-3.1.5.jar; 赠送原API文档:metrics-jvm-3.1.5-javadoc.jar; 赠送源代码:metrics-jvm-3.1.5-sources.jar; 赠送Maven依赖信息文件:metrics-jvm-3.1.5.pom; 包含翻译后的API文档:...
jvm-full-gc调优-jvm-full-gc
java之jvm学习笔记十一(访问控制器)-源码
nginx-upstream-jvm-route-0.1.tar.gz 用来实现Nginx Tomcat 集群session复制的问题!
jvm性能调优-垃圾收集器parnew&CMS底层三色标记算-performance-gc-parnew-cms
mini-jvm in rust实现jvm,jvm-rs-main.zip
代码如下:failed to create jvm error code -4 这一般应是内存不够用所致,解决方法参考如下。 打开 Android Studio 安装目录下的bin目录,查找并打开文件 studio.exe.vmoptions,修改代码: 代码如下:-Xmx512m 为...
JVM规范--高手总结 Java相关 1 1.1Java定义 1 1.2Java的开发流程 1 1.3Java运行的原理 2 1.4半编译半解释 3 1.5平台无关性 4 JVM内存模型 4 2.1 JVM规范 5 2.2 Sun JVM 8 2.3 SUN JVM内存管理(优化) 10 2.4 SUN JVM...
JVM调优总结 -Xms -Xmx -Xmn -Xss JVM调优总结 -Xms -Xmx -Xmn -Xss
一份JVM学习的笔记,含查看JVM运行时信息\JVM垃圾收集信息\JVM锁信息等
nginx_upstream_jvm_route 是一个 Nginx 的扩展模块,用来实现基于 Cookie 的 Session Sticky 的功能。 安装方法(进入Nginx源码目录): #patch -p0 < /path/to/this/directory/jvm_route.patch # ./configure -...
JVM,MIB,可通过SNMP协议监控JVM运行情况
Java分布式应用学习笔记-谈JVM
jvm性能调优-jvm内存模型和优化-performance-jvm-memorymodel-optimize