src/share/vm/runtime/thread.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/runtime

src/share/vm/runtime/thread.cpp

Print this page




 173 void Thread::operator delete(void* p) {
 174   if (UseBiasedLocking) {
 175     void* real_malloc_addr = ((Thread*) p)->_real_malloc_address;
 176     FreeHeap(real_malloc_addr);
 177   } else {
 178     FreeHeap(p);
 179   }
 180 }
 181 
 182 
 183 // Base class for all threads: VMThread, WatcherThread, ConcurrentMarkSweepThread,
 184 // JavaThread
 185 
 186 
 187 Thread::Thread() {
 188   // stack and get_thread
 189   set_stack_base(NULL);
 190   set_stack_size(0);
 191   set_self_raw_id(0);
 192   set_lgrp_id(-1);

 193 
 194   // allocated data structures
 195   set_osthread(NULL);
 196   set_resource_area(new (mtThread)ResourceArea());
 197   DEBUG_ONLY(_current_resource_mark = NULL;)
 198   set_handle_area(new (mtThread) HandleArea(NULL));
 199   set_metadata_handles(new (ResourceObj::C_HEAP, mtClass) GrowableArray<Metadata*>(30, true));
 200   set_active_handles(NULL);
 201   set_free_handle_block(NULL);
 202   set_last_handle_mark(NULL);
 203 
 204   // This initial value ==> never claimed.
 205   _oops_do_parity = 0;
 206 
 207   // the handle mark links itself to last_handle_mark
 208   new HandleMark(this);
 209 
 210   // plain initialization
 211   debug_only(_owned_locks = NULL;)
 212   debug_only(_allow_allocation_count = 0;)




 173 void Thread::operator delete(void* p) {
 174   if (UseBiasedLocking) {
 175     void* real_malloc_addr = ((Thread*) p)->_real_malloc_address;
 176     FreeHeap(real_malloc_addr);
 177   } else {
 178     FreeHeap(p);
 179   }
 180 }
 181 
 182 
 183 // Base class for all threads: VMThread, WatcherThread, ConcurrentMarkSweepThread,
 184 // JavaThread
 185 
 186 
 187 Thread::Thread() {
 188   // stack and get_thread
 189   set_stack_base(NULL);
 190   set_stack_size(0);
 191   set_self_raw_id(0);
 192   set_lgrp_id(-1);
 193   DEBUG_ONLY(clear_suspendible_thread();)
 194 
 195   // allocated data structures
 196   set_osthread(NULL);
 197   set_resource_area(new (mtThread)ResourceArea());
 198   DEBUG_ONLY(_current_resource_mark = NULL;)
 199   set_handle_area(new (mtThread) HandleArea(NULL));
 200   set_metadata_handles(new (ResourceObj::C_HEAP, mtClass) GrowableArray<Metadata*>(30, true));
 201   set_active_handles(NULL);
 202   set_free_handle_block(NULL);
 203   set_last_handle_mark(NULL);
 204 
 205   // This initial value ==> never claimed.
 206   _oops_do_parity = 0;
 207 
 208   // the handle mark links itself to last_handle_mark
 209   new HandleMark(this);
 210 
 211   // plain initialization
 212   debug_only(_owned_locks = NULL;)
 213   debug_only(_allow_allocation_count = 0;)


src/share/vm/runtime/thread.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File