< prev index next >

src/share/vm/logging/logFileOutput.cpp

Print this page
rev 8933 : 8046148.01

@@ -39,11 +39,11 @@
 const char* LogFileOutput::FileCountOptionKey = "filecount";
 char        LogFileOutput::_pid_str[PidBufferSize];
 char        LogFileOutput::_vm_start_time_str[StartTimeBufferSize];
 
 LogFileOutput::LogFileOutput(const char* name)
-    : LogFileStreamOutput(NULL), _name(os::strdup_check_oom(name, mtInternal)),
+    : LogFileStreamOutput(NULL), _name(os::strdup_check_oom(name, mtLogging)),
       _file_name(NULL), _archive_name(NULL), _archive_name_len(0), _current_size(0),
       _rotate_size(0), _current_file(1), _file_count(0),
       _rotation_lock(Mutex::leaf, "LogFileOutput rotation lock", true, Mutex::_safepoint_check_sometimes) {
   _file_name = make_file_name(name, _pid_str, _vm_start_time_str);
 }

@@ -86,11 +86,11 @@
 bool LogFileOutput::configure_rotation(const char* options) {
   if (options == NULL || strlen(options) == 0) {
     return true;
   }
   bool success = true;
-  char* opts = os::strdup_check_oom(options, mtInternal);
+  char* opts = os::strdup_check_oom(options, mtLogging);
 
   char* comma_pos;
   char* pos = opts;
   do {
     comma_pos = strchr(pos, ',');

@@ -114,11 +114,11 @@
         break;
       }
       _file_count = static_cast<uint>(value);
       _file_count_max_digits = static_cast<uint>(log10(static_cast<double>(_file_count)) + 1);
       _archive_name_len = 2 + strlen(_file_name) + _file_count_max_digits;
-      _archive_name = NEW_C_HEAP_ARRAY(char, _archive_name_len, mtOther);
+      _archive_name = NEW_C_HEAP_ARRAY(char, _archive_name_len, mtLogging);
     } else if (strcmp(FileSizeOptionKey, key) == 0) {
       size_t value = parse_value(value_str);
       if (value == SIZE_MAX || value > SIZE_MAX / K) {
         success = false;
         break;

@@ -209,11 +209,11 @@
   const char* pid = strstr(file_name, PidFilenamePlaceholder);
   const char* timestamp = strstr(file_name, TimestampFilenamePlaceholder);
 
   if (pid == NULL && timestamp == NULL) {
     // We found no place-holders, return the simple filename
-    return os::strdup_check_oom(file_name, mtOther);
+    return os::strdup_check_oom(file_name, mtLogging);
   }
 
   // At least one of the place-holders were found in the file_name
   const char* first = "";
   size_t first_pos = -1;

@@ -251,11 +251,11 @@
   size_t first_len = strlen(first);
   size_t second_len = strlen(second);
 
   // Allocate the new buffer, size it to hold all we want to put in there +1.
   size_t result_len =  strlen(file_name) + first_len - first_replace_len + second_len - second_replace_len;
-  result = NEW_C_HEAP_ARRAY(char, result_len + 1, mtOther);
+  result = NEW_C_HEAP_ARRAY(char, result_len + 1, mtLogging);
 
   // Assemble the strings
   size_t file_name_pos = 0;
   size_t i = 0;
   while (i < result_len) {
< prev index next >