Java垃圾回收——内存结构

一般处理过程:

minor collections
 occurring at intervals long enough to allow many of the objects to die between collections.

It is well-tuned in the sense that the young generation is large enough (and thus the period between minor collections long enough) that the minor collection can take advantage of the high infant mortality rate.

This situation can be upset by applications with unusual lifetime distributions, or by poorly sized generations that cause collections to occur before objects have had time to die.

内存结构:
The default arrangement of generations (for all collectors with the exception of the throughput collector) looks something like this.

jvm-ram结构Java垃圾回收鈥斺斈诖娼峁
At initialization, a maximum address space is virtually reserved but not allocated to physical memory unless it is needed. The complete address space reserved for object memory can be divided into the young and tenured generations.

The young generation consists of eden plus two survivor spaces
Objects are initially allocated in eden.
One survivor space is empty at any time, and serves as a destination of the next, copying collection of any live objects in eden and the other survivor space.
Objects are copied between survivor spaces in this way until they are old enough to be tenured, or copied to the tenured generation.

A third generation closely related to the tenured generation is the permanent generation. Thepermanent generation is special because it holds data needed by the virtual machine to describe objects that do not have an equivalence at the Java language level. For example objects describing classes and methods are stored in the permanent generation.

智能处理,可选方案:


如果不行,个性化定制:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值