src/hotspot/share/runtime/thread.cpp
changeset 58084 cddef3bde924
parent 58083 9046db64ca39
child 58095 adc72cd1d1f2
equal deleted inserted replaced
58083:9046db64ca39 58084:cddef3bde924
  1326   _processed_thread(NULL),
  1326   _processed_thread(NULL),
  1327   _gc_id(GCId::undefined())
  1327   _gc_id(GCId::undefined())
  1328 {}
  1328 {}
  1329 
  1329 
  1330 NamedThread::~NamedThread() {
  1330 NamedThread::~NamedThread() {
  1331   if (_name != NULL) {
  1331   FREE_C_HEAP_ARRAY(char, _name);
  1332     FREE_C_HEAP_ARRAY(char, _name);
       
  1333     _name = NULL;
       
  1334   }
       
  1335 }
  1332 }
  1336 
  1333 
  1337 void NamedThread::set_name(const char* format, ...) {
  1334 void NamedThread::set_name(const char* format, ...) {
  1338   guarantee(_name == NULL, "Only get to set name once.");
  1335   guarantee(_name == NULL, "Only get to set name once.");
  1339   _name = NEW_C_HEAP_ARRAY(char, max_name_len, mtThread);
  1336   _name = NEW_C_HEAP_ARRAY(char, max_name_len, mtThread);
  3233   return in_WordSize(sz / wordSize);
  3230   return in_WordSize(sz / wordSize);
  3234 }
  3231 }
  3235 
  3232 
  3236 void JavaThread::popframe_free_preserved_args() {
  3233 void JavaThread::popframe_free_preserved_args() {
  3237   assert(_popframe_preserved_args != NULL, "should not free PopFrame preserved arguments twice");
  3234   assert(_popframe_preserved_args != NULL, "should not free PopFrame preserved arguments twice");
  3238   FREE_C_HEAP_ARRAY(char, (char*) _popframe_preserved_args);
  3235   FREE_C_HEAP_ARRAY(char, (char*)_popframe_preserved_args);
  3239   _popframe_preserved_args = NULL;
  3236   _popframe_preserved_args = NULL;
  3240   _popframe_preserved_args_size = 0;
  3237   _popframe_preserved_args_size = 0;
  3241 }
  3238 }
  3242 
  3239 
  3243 #ifndef PRODUCT
  3240 #ifndef PRODUCT