1 Star 0 Fork 81

zhaosai/openjdk-1.8.0

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
fix_g1uncommit_ygc_expand_crash.patch 785 Bytes
一键复制 编辑 原始数据 按行查看 历史
diff --git a/hotspot/src/share/vm/gc_implementation/g1/heapRegionManager.cpp b/hotspot/src/share/vm/gc_implementation/g1/heapRegionManager.cpp
index 6ad85596..818f6681 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/heapRegionManager.cpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegionManager.cpp
@@ -241,8 +241,8 @@ uint HeapRegionManager::expand_at(uint start, uint num_regions) {
uint HeapRegionManager::expand_on_preferred_node(uint preferred_index) {
uint expand_candidate = UINT_MAX;
for (uint i = 0; i < max_length(); i++) {
- if (is_available(i)) {
- // Already in use continue
+ if (!can_expand(i)) {
+ // Already in use or in uncommit list continue
continue;
}
// Always save the candidate so we can expand later on.
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhaosai-Simon/openjdk-1.8.0.git
git@gitee.com:zhaosai-Simon/openjdk-1.8.0.git
zhaosai-Simon
openjdk-1.8.0
openjdk-1.8.0
master

搜索帮助