Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
0008f1fc
D
dragonwell8_hotspot
项目概览
openanolis
/
dragonwell8_hotspot
通知
2
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_hotspot
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
0008f1fc
编写于
12月 23, 2013
作者:
I
iignatyev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8029070: memory leak in jmm_SetVMGlobal
Reviewed-by: kvn, dholmes
上级
3f11cd3e
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
7 addition
and
4 deletion
+7
-4
src/share/vm/runtime/globals.cpp
src/share/vm/runtime/globals.cpp
+0
-3
src/share/vm/runtime/globals.hpp
src/share/vm/runtime/globals.hpp
+2
-0
src/share/vm/runtime/globals_extension.hpp
src/share/vm/runtime/globals_extension.hpp
+1
-0
src/share/vm/services/management.cpp
src/share/vm/services/management.cpp
+4
-1
未找到文件。
src/share/vm/runtime/globals.cpp
浏览文件 @
0008f1fc
...
...
@@ -759,8 +759,6 @@ bool CommandLineFlags::ccstrAt(char* name, size_t len, ccstr* value) {
return
true
;
}
// Contract: Flag will make private copy of the incoming value.
// Outgoing value is always malloc-ed, and caller MUST call free.
bool
CommandLineFlags
::
ccstrAtPut
(
char
*
name
,
size_t
len
,
ccstr
*
value
,
Flag
::
Flags
origin
)
{
Flag
*
result
=
Flag
::
find_flag
(
name
,
len
);
if
(
result
==
NULL
)
return
false
;
...
...
@@ -784,7 +782,6 @@ bool CommandLineFlags::ccstrAtPut(char* name, size_t len, ccstr* value, Flag::Fl
return
true
;
}
// Contract: Flag will make private copy of the incoming value.
void
CommandLineFlagsEx
::
ccstrAtPut
(
CommandLineFlagWithType
flag
,
ccstr
value
,
Flag
::
Flags
origin
)
{
Flag
*
faddr
=
address_of_flag
(
flag
);
guarantee
(
faddr
!=
NULL
&&
faddr
->
is_ccstr
(),
"wrong flag type"
);
...
...
src/share/vm/runtime/globals.hpp
浏览文件 @
0008f1fc
...
...
@@ -390,6 +390,8 @@ class CommandLineFlags {
static
bool
ccstrAt
(
char
*
name
,
size_t
len
,
ccstr
*
value
);
static
bool
ccstrAt
(
char
*
name
,
ccstr
*
value
)
{
return
ccstrAt
(
name
,
strlen
(
name
),
value
);
}
// Contract: Flag will make private copy of the incoming value.
// Outgoing value is always malloc-ed, and caller MUST call free.
static
bool
ccstrAtPut
(
char
*
name
,
size_t
len
,
ccstr
*
value
,
Flag
::
Flags
origin
);
static
bool
ccstrAtPut
(
char
*
name
,
ccstr
*
value
,
Flag
::
Flags
origin
)
{
return
ccstrAtPut
(
name
,
strlen
(
name
),
value
,
origin
);
}
...
...
src/share/vm/runtime/globals_extension.hpp
浏览文件 @
0008f1fc
...
...
@@ -201,6 +201,7 @@ class CommandLineFlagsEx : CommandLineFlags {
static
void
uintxAtPut
(
CommandLineFlagWithType
flag
,
uintx
value
,
Flag
::
Flags
origin
);
static
void
uint64_tAtPut
(
CommandLineFlagWithType
flag
,
uint64_t
value
,
Flag
::
Flags
origin
);
static
void
doubleAtPut
(
CommandLineFlagWithType
flag
,
double
value
,
Flag
::
Flags
origin
);
// Contract: Flag will make private copy of the incoming value
static
void
ccstrAtPut
(
CommandLineFlagWithType
flag
,
ccstr
value
,
Flag
::
Flags
origin
);
static
bool
is_default
(
CommandLineFlag
flag
);
...
...
src/share/vm/services/management.cpp
浏览文件 @
0008f1fc
...
...
@@ -1824,7 +1824,7 @@ JVM_ENTRY(void, jmm_SetVMGlobal(JNIEnv *env, jstring flag_name, jvalue new_value
"This flag is not writeable."
);
}
bool
succeed
;
bool
succeed
=
false
;
if
(
flag
->
is_bool
())
{
bool
bvalue
=
(
new_value
.
z
==
JNI_TRUE
?
true
:
false
);
succeed
=
CommandLineFlags
::
boolAtPut
(
name
,
&
bvalue
,
Flag
::
MANAGEMENT
);
...
...
@@ -1856,6 +1856,9 @@ JVM_ENTRY(void, jmm_SetVMGlobal(JNIEnv *env, jstring flag_name, jvalue new_value
}
ccstr
svalue
=
java_lang_String
::
as_utf8_string
(
str
);
succeed
=
CommandLineFlags
::
ccstrAtPut
(
name
,
&
svalue
,
Flag
::
MANAGEMENT
);
if
(
succeed
)
{
FREE_C_HEAP_ARRAY
(
char
,
svalue
,
mtInternal
);
}
}
assert
(
succeed
,
"Setting flag should succeed"
);
JVM_END
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录