equal
deleted
inserted
replaced
1554 } |
1554 } |
1555 #endif |
1555 #endif |
1556 |
1556 |
1557 // ChunkManager methods |
1557 // ChunkManager methods |
1558 |
1558 |
1559 // Verification of _free_chunks_total and _free_chunks_count does not |
|
1560 // work with the CMS collector because its use of additional locks |
|
1561 // complicate the mutex deadlock detection but it can still be useful |
|
1562 // for detecting errors in the chunk accounting with other collectors. |
|
1563 |
|
1564 size_t ChunkManager::free_chunks_total() { |
1559 size_t ChunkManager::free_chunks_total() { |
1565 #ifdef ASSERT |
|
1566 if (!UseConcMarkSweepGC && !SpaceManager::expand_lock()->is_locked()) { |
|
1567 MutexLockerEx cl(SpaceManager::expand_lock(), |
|
1568 Mutex::_no_safepoint_check_flag); |
|
1569 slow_locked_verify_free_chunks_total(); |
|
1570 } |
|
1571 #endif |
|
1572 return _free_chunks_total; |
1560 return _free_chunks_total; |
1573 } |
1561 } |
1574 |
1562 |
1575 size_t ChunkManager::free_chunks_total_in_bytes() { |
1563 size_t ChunkManager::free_chunks_total_in_bytes() { |
1576 return free_chunks_total() * BytesPerWord; |
1564 return free_chunks_total() * BytesPerWord; |