8054368: nsk/jdi/VirtualMachine/exit/exit002 crash with detail tracking on (NMT2)

Dynamic allocate _reserved_regions instead of static object to avoid racing during process exit

Reviewed-by: dholmes, coleenp
This commit is contained in:
Zhengyu Gu 2014-08-14 09:02:51 -04:00
parent 8a690a1250
commit 06a502d4a6
3 changed files with 41 additions and 14 deletions

View file

@ -414,6 +414,9 @@ class VirtualMemoryTracker : AllStatic {
public:
static bool initialize(NMT_TrackingLevel level);
// Late phase initialization
static bool late_initialize(NMT_TrackingLevel level);
static bool add_reserved_region (address base_addr, size_t size, const NativeCallStack& stack,
MEMFLAGS flag = mtNone, bool all_committed = false);
@ -428,7 +431,7 @@ class VirtualMemoryTracker : AllStatic {
static bool transition(NMT_TrackingLevel from, NMT_TrackingLevel to);
private:
static SortedLinkedList<ReservedMemoryRegion, compare_reserved_region_base> _reserved_regions;
static SortedLinkedList<ReservedMemoryRegion, compare_reserved_region_base>* _reserved_regions;
};