1 Star 0 Fork 83

zhaosai/openjdk-1.8.0

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
dynamic-cds-_header-and-_fd-handles-are-not-free.patch 954 Bytes
一键复制 编辑 原始数据 按行查看 历史
From cf12a2fae11baf41773308a48d9cfad9031f5344 Mon Sep 17 00:00:00 2001
Date: Fri, 9 Sep 2022 11:26:22 +0800
Subject: dynamic cds _header and _fd handles are not free.
---
hotspot/src/share/vm/memory/filemap.cpp | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/hotspot/src/share/vm/memory/filemap.cpp b/hotspot/src/share/vm/memory/filemap.cpp
index adb043f77..6549828e3 100644
--- a/hotspot/src/share/vm/memory/filemap.cpp
+++ b/hotspot/src/share/vm/memory/filemap.cpp
@@ -169,6 +169,18 @@ FileMapInfo::~FileMapInfo() {
assert(_dynamic_archive_info == this, "must be singleton"); // not thread safe
_dynamic_archive_info = NULL;
}
+
+ if (_header != NULL) {
+ delete _header;
+ }
+
+ if (_file_open) {
+ if (::close(_fd) < 0) {
+ fail_stop("Unable to close the shared archive file.");
+ }
+ _file_open = false;
+ _fd = -1;
+ }
}
void FileMapInfo::populate_header(size_t alignment) {
--
2.22.0
Loading...
马建仓 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

搜索帮助