mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 11:04:34 +02:00
Merge
This commit is contained in:
commit
626bd19644
1 changed files with 9 additions and 2 deletions
|
@ -876,8 +876,6 @@ JVM_ENTRY(jobject, jmm_GetMemoryUsage(JNIEnv* env, jboolean heap))
|
|||
total_used += u.used();
|
||||
total_committed += u.committed();
|
||||
|
||||
// if any one of the memory pool has undefined init_size or max_size,
|
||||
// set it to -1
|
||||
if (u.init_size() == (size_t)-1) {
|
||||
has_undefined_init_size = true;
|
||||
}
|
||||
|
@ -894,6 +892,15 @@ JVM_ENTRY(jobject, jmm_GetMemoryUsage(JNIEnv* env, jboolean heap))
|
|||
}
|
||||
}
|
||||
|
||||
// if any one of the memory pool has undefined init_size or max_size,
|
||||
// set it to -1
|
||||
if (has_undefined_init_size) {
|
||||
total_init = (size_t)-1;
|
||||
}
|
||||
if (has_undefined_max_size) {
|
||||
total_max = (size_t)-1;
|
||||
}
|
||||
|
||||
MemoryUsage usage((heap ? InitialHeapSize : total_init),
|
||||
total_used,
|
||||
total_committed,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue