< prev index next >

src/share/vm/services/memTracker.cpp

Print this page

        

@@ -45,13 +45,13 @@
 
 
 NMT_TrackingLevel MemTracker::init_tracking_level() {
   NMT_TrackingLevel level = NMT_off;
   char buf[64];
-  char nmt_option[64];
   jio_snprintf(buf, sizeof(buf), "NMT_LEVEL_%d", os::current_process_id());
-  if (os::getenv(buf, nmt_option, sizeof(nmt_option))) {
+  const char *nmt_option = ::getenv(buf);
+  if (nmt_option != NULL) {
     if (strcmp(nmt_option, "summary") == 0) {
       level = NMT_summary;
     } else if (strcmp(nmt_option, "detail") == 0) {
 #if PLATFORM_NATIVE_STACK_WALKING_SUPPORTED
       level = NMT_detail;

@@ -321,6 +321,5 @@
   out->print_cr("             Tracking stack depth: %d", NMT_TrackingStackDepth);
   NOT_PRODUCT(out->print_cr("Peak concurrent access: %d", MallocSiteTable::access_peak_count());)
   out->print_cr(" ");
   walker.report_statistics(out);
 }
-
< prev index next >