comparison src/share/vm/services/diagnosticArgument.cpp @ 3465:d2a62e0f25eb

6995781: Native Memory Tracking (Phase 1) 7151532: DCmd for hotspot native memory tracking Summary: Implementation of native memory tracking phase 1, which tracks VM native memory usage, and related DCmd Reviewed-by: acorn, coleenp, fparain
author zgu
date Thu, 28 Jun 2012 17:03:16 -0400
parents 51612f0c0a79
children 79f492f184d0 203f64878aab
comparison
equal deleted inserted replaced
3:0a2f5f4e55a1 4:aa82242609f0
138 template <> void DCmdArgument<char*>::parse_value(const char* str, 138 template <> void DCmdArgument<char*>::parse_value(const char* str,
139 size_t len, TRAPS) { 139 size_t len, TRAPS) {
140 if (str == NULL) { 140 if (str == NULL) {
141 _value = NULL; 141 _value = NULL;
142 } else { 142 } else {
143 _value = NEW_C_HEAP_ARRAY(char, len+1); 143 _value = NEW_C_HEAP_ARRAY(char, len+1, mtInternal);
144 strncpy(_value, str, len); 144 strncpy(_value, str, len);
145 _value[len] = 0; 145 _value[len] = 0;
146 } 146 }
147 } 147 }
148 148
157 } 157 }
158 } 158 }
159 159
160 template <> void DCmdArgument<char*>::destroy_value() { 160 template <> void DCmdArgument<char*>::destroy_value() {
161 if (_value != NULL) { 161 if (_value != NULL) {
162 FREE_C_HEAP_ARRAY(char, _value); 162 FREE_C_HEAP_ARRAY(char, _value, mtInternal);
163 set_value(NULL); 163 set_value(NULL);
164 } 164 }
165 } 165 }
166 166
167 template <> void DCmdArgument<NanoTimeArgument>::parse_value(const char* str, 167 template <> void DCmdArgument<NanoTimeArgument>::parse_value(const char* str,