< prev index next >

src/hotspot/share/runtime/handles.inline.hpp

Print this page




  87 
  88 inline void HandleMark::pop_and_restore() {
  89   HandleArea* area = _area;   // help compilers with poor alias analysis
  90   // Delete later chunks
  91   if( _chunk->next() ) {
  92     // reset arena size before delete chunks. Otherwise, the total
  93     // arena size could exceed total chunk size
  94     assert(area->size_in_bytes() > size_in_bytes(), "Sanity check");
  95     area->set_size_in_bytes(size_in_bytes());
  96     _chunk->next_chop();
  97   } else {
  98     assert(area->size_in_bytes() == size_in_bytes(), "Sanity check");
  99   }
 100   // Roll back arena to saved top markers
 101   area->_chunk = _chunk;
 102   area->_hwm = _hwm;
 103   area->_max = _max;
 104   debug_only(area->_handle_mark_nesting--);
 105 }
 106 









 107 #endif // SHARE_VM_RUNTIME_HANDLES_INLINE_HPP


  87 
  88 inline void HandleMark::pop_and_restore() {
  89   HandleArea* area = _area;   // help compilers with poor alias analysis
  90   // Delete later chunks
  91   if( _chunk->next() ) {
  92     // reset arena size before delete chunks. Otherwise, the total
  93     // arena size could exceed total chunk size
  94     assert(area->size_in_bytes() > size_in_bytes(), "Sanity check");
  95     area->set_size_in_bytes(size_in_bytes());
  96     _chunk->next_chop();
  97   } else {
  98     assert(area->size_in_bytes() == size_in_bytes(), "Sanity check");
  99   }
 100   // Roll back arena to saved top markers
 101   area->_chunk = _chunk;
 102   area->_hwm = _hwm;
 103   area->_max = _max;
 104   debug_only(area->_handle_mark_nesting--);
 105 }
 106 
 107 inline HandleMarkCleaner::HandleMarkCleaner(Thread* thread) {
 108   _thread = thread;
 109   _thread->last_handle_mark()->push();
 110 }
 111 
 112 inline HandleMarkCleaner::~HandleMarkCleaner() {
 113   _thread->last_handle_mark()->pop_and_restore();
 114 }
 115 
 116 #endif // SHARE_VM_RUNTIME_HANDLES_INLINE_HPP
< prev index next >