8207200: Committed > max memory usage when getting MemoryUsage

Make sure that modification of memory usage variables are synchronized with returning them to Java.

Reviewed-by: sangheki, mchung
This commit is contained in:
Thomas Schatzl 2018-09-04 12:18:35 +02:00
parent a7d4df53fa
commit db7b4e20e1
10 changed files with 105 additions and 49 deletions

View file

@ -31,6 +31,7 @@
#include "runtime/handles.hpp"
#include "runtime/perfData.hpp"
#include "runtime/safepoint.hpp"
#include "services/memoryUsage.hpp"
#include "utilities/debug.hpp"
#include "utilities/events.hpp"
#include "utilities/formatBuffer.hpp"
@ -423,6 +424,7 @@ class CollectedHeap : public CHeapObj<mtInternal> {
// Return the SoftRefPolicy for the heap;
virtual SoftRefPolicy* soft_ref_policy() = 0;
virtual MemoryUsage memory_usage();
virtual GrowableArray<GCMemoryManager*> memory_managers() = 0;
virtual GrowableArray<MemoryPool*> memory_pools() = 0;