--- a/src/hotspot/share/gc/cms/gSpaceCounters.cpp Wed Nov 29 18:43:35 2017 -0800
+++ b/src/hotspot/share/gc/cms/gSpaceCounters.cpp Tue Nov 28 21:43:45 2017 +0100
@@ -25,6 +25,7 @@
#include "precompiled.hpp"
#include "gc/cms/gSpaceCounters.hpp"
#include "gc/shared/generation.hpp"
+#include "memory/allocation.inline.hpp"
#include "memory/resourceArea.hpp"
#include "utilities/macros.hpp"
@@ -71,3 +72,7 @@
_gen->capacity(), CHECK);
}
}
+
+GSpaceCounters::~GSpaceCounters() {
+ if (_name_space != NULL) FREE_C_HEAP_ARRAY(char, _name_space);
+}