equal
deleted
inserted
replaced
134 |
134 |
135 inline void HandleMark::pop_and_restore() { |
135 inline void HandleMark::pop_and_restore() { |
136 HandleArea* area = _area; // help compilers with poor alias analysis |
136 HandleArea* area = _area; // help compilers with poor alias analysis |
137 // Delete later chunks |
137 // Delete later chunks |
138 if( _chunk->next() ) { |
138 if( _chunk->next() ) { |
|
139 // reset arena size before delete chunks. Otherwise, the total |
|
140 // arena size could exceed total chunk size |
|
141 assert(area->size_in_bytes() > size_in_bytes(), "Sanity check"); |
|
142 area->set_size_in_bytes(size_in_bytes()); |
139 _chunk->next_chop(); |
143 _chunk->next_chop(); |
|
144 } else { |
|
145 assert(area->size_in_bytes() == size_in_bytes(), "Sanity check"); |
140 } |
146 } |
141 // Roll back arena to saved top markers |
147 // Roll back arena to saved top markers |
142 area->_chunk = _chunk; |
148 area->_chunk = _chunk; |
143 area->_hwm = _hwm; |
149 area->_hwm = _hwm; |
144 area->_max = _max; |
150 area->_max = _max; |
145 area->set_size_in_bytes(_size_in_bytes); |
|
146 debug_only(area->_handle_mark_nesting--); |
151 debug_only(area->_handle_mark_nesting--); |
147 } |
152 } |
148 |
153 |
149 #endif // SHARE_VM_RUNTIME_HANDLES_INLINE_HPP |
154 #endif // SHARE_VM_RUNTIME_HANDLES_INLINE_HPP |