equal
deleted
inserted
replaced
319 _direct_allocated[state] = 0; |
319 _direct_allocated[state] = 0; |
320 } |
320 } |
321 } |
321 } |
322 } |
322 } |
323 |
323 |
324 void G1PLABAllocator::waste(size_t& wasted, size_t& undo_wasted) { |
324 size_t G1PLABAllocator::waste() const { |
325 wasted = 0; |
325 size_t result = 0; |
326 undo_wasted = 0; |
|
327 for (uint state = 0; state < InCSetState::Num; state++) { |
326 for (uint state = 0; state < InCSetState::Num; state++) { |
328 PLAB * const buf = _alloc_buffers[state]; |
327 PLAB * const buf = _alloc_buffers[state]; |
329 if (buf != NULL) { |
328 if (buf != NULL) { |
330 wasted += buf->waste(); |
329 result += buf->waste(); |
331 undo_wasted += buf->undo_waste(); |
330 } |
332 } |
331 } |
333 } |
332 return result; |
|
333 } |
|
334 |
|
335 size_t G1PLABAllocator::undo_waste() const { |
|
336 size_t result = 0; |
|
337 for (uint state = 0; state < InCSetState::Num; state++) { |
|
338 PLAB * const buf = _alloc_buffers[state]; |
|
339 if (buf != NULL) { |
|
340 result += buf->undo_waste(); |
|
341 } |
|
342 } |
|
343 return result; |
334 } |
344 } |
335 |
345 |
336 bool G1ArchiveAllocator::_archive_check_enabled = false; |
346 bool G1ArchiveAllocator::_archive_check_enabled = false; |
337 G1ArchiveRegionMap G1ArchiveAllocator::_closed_archive_region_map; |
347 G1ArchiveRegionMap G1ArchiveAllocator::_closed_archive_region_map; |
338 G1ArchiveRegionMap G1ArchiveAllocator::_open_archive_region_map; |
348 G1ArchiveRegionMap G1ArchiveAllocator::_open_archive_region_map; |