hotspot/src/share/vm/services/gcNotifier.cpp
changeset 11591 854c0dff3844
parent 10242 ec32bf88801c
child 11766 b1ff60353280
--- a/hotspot/src/share/vm/services/gcNotifier.cpp	Mon Jan 23 17:45:32 2012 -0800
+++ b/hotspot/src/share/vm/services/gcNotifier.cpp	Wed Jan 25 02:29:05 2012 +0400
@@ -44,7 +44,8 @@
   // Make a copy of the last GC statistics
   // GC may occur between now and the creation of the notification
   int num_pools = MemoryService::num_memory_pools();
-  GCStatInfo* stat = new GCStatInfo(num_pools);
+  // stat is deallocated inside GCNotificationRequest
+  GCStatInfo* stat = new(ResourceObj::C_HEAP) GCStatInfo(num_pools);
   mgr->get_last_gc_stat(stat);
   GCNotificationRequest *request = new GCNotificationRequest(os::javaTimeMillis(),mgr,action,cause,stat);
   addRequest(request);