“从太空"是什么意思?和“到太空"显示在jmap中? [英] What is the meaning of "From Space" and "To Space" shown in jmap?

查看:49
本文介绍了“从太空"是什么意思?和“到太空"显示在jmap中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我了解新世代/旧世代/perm世代之间的区别,但是我不知道到太空"和从太空"是什么.我看到我的来自太空"的使用率达到了99.8%,而至太空"的使用率似乎始终保持在0%.

I understand the difference between new gen / old gen /perm gen, but I don't know what "To Space" and "From Space" are. I am seeing my "From Space" hitting 99.8% used while the "To Space" always seems to stay at 0% used.

推荐答案

VM中使用的垃圾收集算法中的两个区域.

Two regions in the garbage-collection algorithm that is used in the VM.

有关Java的详细信息,请参见:垃圾收集如何在Java中工作

Java specifics are found here: How Garbage Collection works in Java

以及有关从太空"和到太空"的一般解释: WP

And a general explanation about "from space" and "to space": WP

最直接的方法是半空间收集器,它可以追溯到1969年.在这种不断发展的GC方案中,内存被划分为来自空间" 至空间" .最初,将对象分配到空间"中,直到它们变满并触发集合.在收集开始时,到太空"变为从太空",反之亦然.根集合可访问的对象从从空间"复制到至空间"

The most straightforward approach is the semi-space collector, which dates to 1969. In this moving GC scheme, memory is partitioned into a "from space" and "to space". Initially, objects are allocated into "to space" until they become full and a collection is triggered. At the start of a collection, the "to space" becomes the "from space", and vice versa. The objects reachable from the root set are copied from the "from space" to the "to space"

您的空间间隔"为0%的原因是,除了在收集过程中,仅使用了其中之一;当完成收集并且所有obj都位于"to space"中时,名称将被交换,并且"to space"现在称为"from space".

The reason why your "to space" is at 0% is, that only one of them is used except during collection; when the collection is done and all objs are in the "to space" then the names are swapped and the "to space" is now called the "from space".

这篇关于“从太空"是什么意思?和“到太空"显示在jmap中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆