hotspot/src/share/vm/services/management.cpp
changeset 25960 729cd80956ae
parent 25959 6c11a6272b60
parent 25949 34557722059b
child 26834 41332d860d6a
--- a/hotspot/src/share/vm/services/management.cpp	Mon Aug 11 14:03:06 2014 +0200
+++ b/hotspot/src/share/vm/services/management.cpp	Thu Aug 14 18:42:08 2014 +0000
@@ -1920,7 +1920,7 @@
   ResourceMark rm(THREAD); // thread->name() uses ResourceArea
 
   assert(thread->name() != NULL, "All threads should have a name");
-  _names_chars[_count] = strdup(thread->name());
+  _names_chars[_count] = os::strdup(thread->name());
   _times->long_at_put(_count, os::is_thread_cpu_time_supported() ?
                         os::thread_cpu_time(thread) : -1);
   _count++;
@@ -1938,7 +1938,7 @@
 
 ThreadTimesClosure::~ThreadTimesClosure() {
   for (int i = 0; i < _count; i++) {
-    free(_names_chars[i]);
+    os::free(_names_chars[i]);
   }
   FREE_C_HEAP_ARRAY(char *, _names_chars, mtInternal);
 }