ysr@777: /* azakharov@7835: * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved. ysr@777: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ysr@777: * ysr@777: * This code is free software; you can redistribute it and/or modify it ysr@777: * under the terms of the GNU General Public License version 2 only, as ysr@777: * published by the Free Software Foundation. ysr@777: * ysr@777: * This code is distributed in the hope that it will be useful, but WITHOUT ysr@777: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ysr@777: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ysr@777: * version 2 for more details (a copy is included in the LICENSE file that ysr@777: * accompanied this code). ysr@777: * ysr@777: * You should have received a copy of the GNU General Public License version ysr@777: * 2 along with this work; if not, write to the Free Software Foundation, ysr@777: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ysr@777: * trims@1907: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA trims@1907: * or visit www.oracle.com if you need additional information or have any trims@1907: * questions. ysr@777: * ysr@777: */ ysr@777: stefank@2314: #include "precompiled.hpp" tonyp@2963: #include "gc_implementation/g1/heapRegion.hpp" tschatzl@7091: #include "gc_implementation/g1/heapRegionManager.inline.hpp" tschatzl@7050: #include "gc_implementation/g1/heapRegionSet.inline.hpp" stefank@2314: #include "gc_implementation/g1/g1CollectedHeap.inline.hpp" tschatzl@7050: #include "gc_implementation/g1/concurrentG1Refine.hpp" stefank@2314: #include "memory/allocation.hpp" ysr@777: tschatzl@7091: void HeapRegionManager::initialize(G1RegionToSpaceMapper* heap_storage, tschatzl@7051: G1RegionToSpaceMapper* prev_bitmap, tschatzl@7051: G1RegionToSpaceMapper* next_bitmap, tschatzl@7051: G1RegionToSpaceMapper* bot, tschatzl@7051: G1RegionToSpaceMapper* cardtable, tschatzl@7051: G1RegionToSpaceMapper* card_counts) { tschatzl@7050: _allocated_heapregions_length = 0; tschatzl@7050: tschatzl@7051: _heap_mapper = heap_storage; tschatzl@7051: tschatzl@7051: _prev_bitmap_mapper = prev_bitmap; tschatzl@7051: _next_bitmap_mapper = next_bitmap; tschatzl@7051: tschatzl@7051: _bot_mapper = bot; tschatzl@7051: _cardtable_mapper = cardtable; tschatzl@7051: tschatzl@7051: _card_counts_mapper = card_counts; tschatzl@7051: tschatzl@7051: MemRegion reserved = heap_storage->reserved(); tschatzl@7051: _regions.initialize(reserved.start(), reserved.end(), HeapRegion::GrainBytes); tschatzl@7051: tschatzl@7051: _available_map.resize(_regions.length(), false); tschatzl@7051: _available_map.clear(); tschatzl@7050: } tschatzl@7050: tschatzl@7091: bool HeapRegionManager::is_available(uint region) const { tschatzl@7051: return _available_map.at(region); tschatzl@7050: } tschatzl@7050: tschatzl@7050: #ifdef ASSERT tschatzl@7091: bool HeapRegionManager::is_free(HeapRegion* hr) const { tschatzl@7050: return _free_list.contains(hr); tschatzl@7050: } tschatzl@7050: #endif tschatzl@7050: tschatzl@7091: HeapRegion* HeapRegionManager::new_heap_region(uint hrm_index) { sjohanss@7131: G1CollectedHeap* g1h = G1CollectedHeap::heap(); sjohanss@7131: HeapWord* bottom = g1h->bottom_addr_for_region(hrm_index); tschatzl@7050: MemRegion mr(bottom, bottom + HeapRegion::GrainWords); tschatzl@7050: assert(reserved().contains(mr), "invariant"); sjohanss@7131: return g1h->allocator()->new_heap_region(hrm_index, g1h->bot_shared(), mr); tschatzl@7050: } tschatzl@7050: tschatzl@7091: void HeapRegionManager::commit_regions(uint index, size_t num_regions) { tschatzl@7050: guarantee(num_regions > 0, "Must commit more than zero regions"); tschatzl@7050: guarantee(_num_committed + num_regions <= max_length(), "Cannot commit more than the maximum amount of regions"); tschatzl@7050: tschatzl@7051: _num_committed += (uint)num_regions; tschatzl@7051: tschatzl@7051: _heap_mapper->commit_regions(index, num_regions); tschatzl@7051: tschatzl@7051: // Also commit auxiliary data tschatzl@7051: _prev_bitmap_mapper->commit_regions(index, num_regions); tschatzl@7051: _next_bitmap_mapper->commit_regions(index, num_regions); tschatzl@7051: tschatzl@7051: _bot_mapper->commit_regions(index, num_regions); tschatzl@7051: _cardtable_mapper->commit_regions(index, num_regions); tschatzl@7051: tschatzl@7051: _card_counts_mapper->commit_regions(index, num_regions); tschatzl@7050: } tschatzl@7050: tschatzl@7091: void HeapRegionManager::uncommit_regions(uint start, size_t num_regions) { tschatzl@7051: guarantee(num_regions >= 1, err_msg("Need to specify at least one region to uncommit, tried to uncommit zero regions at %u", start)); tschatzl@7050: guarantee(_num_committed >= num_regions, "pre-condition"); tschatzl@7050: tschatzl@7050: // Print before uncommitting. tschatzl@7050: if (G1CollectedHeap::heap()->hr_printer()->is_active()) { tschatzl@7050: for (uint i = start; i < start + num_regions; i++) { tschatzl@7050: HeapRegion* hr = at(i); tschatzl@7050: G1CollectedHeap::heap()->hr_printer()->uncommit(hr->bottom(), hr->end()); tonyp@2472: } tonyp@2472: } tschatzl@7050: tschatzl@7050: _num_committed -= (uint)num_regions; tschatzl@7050: tschatzl@7051: _available_map.par_clear_range(start, start + num_regions, BitMap::unknown_range); tschatzl@7051: _heap_mapper->uncommit_regions(start, num_regions); tschatzl@7051: tschatzl@7051: // Also uncommit auxiliary data tschatzl@7051: _prev_bitmap_mapper->uncommit_regions(start, num_regions); tschatzl@7051: _next_bitmap_mapper->uncommit_regions(start, num_regions); tschatzl@7051: tschatzl@7051: _bot_mapper->uncommit_regions(start, num_regions); tschatzl@7051: _cardtable_mapper->uncommit_regions(start, num_regions); tschatzl@7051: tschatzl@7051: _card_counts_mapper->uncommit_regions(start, num_regions); tschatzl@7050: } tschatzl@7050: tschatzl@7091: void HeapRegionManager::make_regions_available(uint start, uint num_regions) { tschatzl@7050: guarantee(num_regions > 0, "No point in calling this for zero regions"); tschatzl@7050: commit_regions(start, num_regions); tschatzl@7050: for (uint i = start; i < start + num_regions; i++) { tschatzl@7050: if (_regions.get_by_index(i) == NULL) { tschatzl@7050: HeapRegion* new_hr = new_heap_region(i); tschatzl@7050: _regions.set_by_index(i, new_hr); tschatzl@7050: _allocated_heapregions_length = MAX2(_allocated_heapregions_length, i + 1); tonyp@2472: } tschatzl@7050: } tschatzl@7050: tschatzl@7051: _available_map.par_set_range(start, start + num_regions, BitMap::unknown_range); tschatzl@7050: tschatzl@7050: for (uint i = start; i < start + num_regions; i++) { tschatzl@7050: assert(is_available(i), err_msg("Just made region %u available but is apparently not.", i)); tschatzl@7050: HeapRegion* hr = at(i); tschatzl@7050: if (G1CollectedHeap::heap()->hr_printer()->is_active()) { tschatzl@7050: G1CollectedHeap::heap()->hr_printer()->commit(hr->bottom(), hr->end()); tschatzl@7050: } tschatzl@7050: HeapWord* bottom = G1CollectedHeap::heap()->bottom_addr_for_region(i); tschatzl@7050: MemRegion mr(bottom, bottom + HeapRegion::GrainWords); tschatzl@7050: tschatzl@7050: hr->initialize(mr); tschatzl@7050: insert_into_free_list(at(i)); tonyp@2472: } tonyp@2472: } tonyp@2472: azakharov@7835: MemoryUsage HeapRegionManager::get_auxiliary_data_memory_usage() const { azakharov@7835: size_t used_sz = azakharov@7835: _prev_bitmap_mapper->committed_size() + azakharov@7835: _next_bitmap_mapper->committed_size() + azakharov@7835: _bot_mapper->committed_size() + azakharov@7835: _cardtable_mapper->committed_size() + azakharov@7835: _card_counts_mapper->committed_size(); azakharov@7835: azakharov@7835: size_t committed_sz = azakharov@7835: _prev_bitmap_mapper->reserved_size() + azakharov@7835: _next_bitmap_mapper->reserved_size() + azakharov@7835: _bot_mapper->reserved_size() + azakharov@7835: _cardtable_mapper->reserved_size() + azakharov@7835: _card_counts_mapper->reserved_size(); azakharov@7835: azakharov@7835: return MemoryUsage(0, used_sz, committed_sz, committed_sz); azakharov@7835: } azakharov@7835: tschatzl@7091: uint HeapRegionManager::expand_by(uint num_regions) { tschatzl@7051: return expand_at(0, num_regions); tonyp@2963: } tonyp@2963: tschatzl@7091: uint HeapRegionManager::expand_at(uint start, uint num_regions) { tschatzl@7050: if (num_regions == 0) { tschatzl@7050: return 0; tschatzl@7050: } tonyp@2963: tschatzl@7050: uint cur = start; tschatzl@7050: uint idx_last_found = 0; tschatzl@7050: uint num_last_found = 0; tonyp@2963: tschatzl@7050: uint expanded = 0; tonyp@2963: tschatzl@7050: while (expanded < num_regions && tschatzl@7050: (num_last_found = find_unavailable_from_idx(cur, &idx_last_found)) > 0) { tschatzl@7050: uint to_expand = MIN2(num_regions - expanded, num_last_found); tschatzl@7050: make_regions_available(idx_last_found, to_expand); tschatzl@7050: expanded += to_expand; tschatzl@7050: cur = idx_last_found + num_last_found + 1; tschatzl@7050: } tonyp@2963: tschatzl@7050: verify_optional(); tschatzl@7050: return expanded; tonyp@2963: } tonyp@2963: tschatzl@7091: uint HeapRegionManager::find_contiguous(size_t num, bool empty_only) { tschatzl@7050: uint found = 0; tschatzl@7050: size_t length_found = 0; tschatzl@7050: uint cur = 0; tschatzl@7050: tschatzl@7050: while (length_found < num && cur < max_length()) { tschatzl@7050: HeapRegion* hr = _regions.get_by_index(cur); tschatzl@7050: if ((!empty_only && !is_available(cur)) || (is_available(cur) && hr != NULL && hr->is_empty())) { tschatzl@7050: // This region is a potential candidate for allocation into. tschatzl@7050: length_found++; tschatzl@7050: } else { tschatzl@7050: // This region is not a candidate. The next region is the next possible one. tschatzl@7050: found = cur + 1; tschatzl@7050: length_found = 0; tonyp@2963: } tschatzl@7050: cur++; tonyp@2472: } tschatzl@7050: tschatzl@7050: if (length_found == num) { tschatzl@7050: for (uint i = found; i < (found + num); i++) { tschatzl@7050: HeapRegion* hr = _regions.get_by_index(i); tschatzl@7050: // sanity check tschatzl@7050: guarantee((!empty_only && !is_available(i)) || (is_available(i) && hr != NULL && hr->is_empty()), tschatzl@7050: err_msg("Found region sequence starting at " UINT32_FORMAT ", length " SIZE_FORMAT tschatzl@7050: " that is not empty at " UINT32_FORMAT ". Hr is " PTR_FORMAT, found, num, i, p2i(hr))); tschatzl@7050: } tschatzl@7050: return found; tschatzl@7050: } else { tschatzl@7091: return G1_NO_HRM_INDEX; tschatzl@7050: } ysr@777: } ysr@777: tschatzl@7091: HeapRegion* HeapRegionManager::next_region_in_heap(const HeapRegion* r) const { tschatzl@7050: guarantee(r != NULL, "Start region must be a valid region"); tschatzl@7091: guarantee(is_available(r->hrm_index()), err_msg("Trying to iterate starting from region %u which is not in the heap", r->hrm_index())); tschatzl@7091: for (uint i = r->hrm_index() + 1; i < _allocated_heapregions_length; i++) { tschatzl@7050: HeapRegion* hr = _regions.get_by_index(i); tschatzl@7050: if (is_available(i)) { tschatzl@7050: return hr; tschatzl@7050: } tonyp@2963: } tschatzl@7050: return NULL; ysr@777: } ysr@777: tschatzl@7091: void HeapRegionManager::iterate(HeapRegionClosure* blk) const { tschatzl@7050: uint len = max_length(); ysr@777: tschatzl@7050: for (uint i = 0; i < len; i++) { tschatzl@7050: if (!is_available(i)) { tschatzl@7050: continue; ysr@777: } tschatzl@7050: guarantee(at(i) != NULL, err_msg("Tried to access region %u that has a NULL HeapRegion*", i)); tonyp@2963: bool res = blk->doHeapRegion(at(i)); ysr@777: if (res) { ysr@777: blk->incomplete(); ysr@777: return; ysr@777: } ysr@777: } ysr@777: } ysr@777: tschatzl@7091: uint HeapRegionManager::find_unavailable_from_idx(uint start_idx, uint* res_idx) const { tschatzl@7050: guarantee(res_idx != NULL, "checking"); tschatzl@7050: guarantee(start_idx <= (max_length() + 1), "checking"); tschatzl@7050: tschatzl@7050: uint num_regions = 0; tschatzl@7050: tschatzl@7050: uint cur = start_idx; tschatzl@7050: while (cur < max_length() && is_available(cur)) { tschatzl@7050: cur++; tschatzl@7050: } tschatzl@7050: if (cur == max_length()) { tschatzl@7050: return num_regions; tschatzl@7050: } tschatzl@7050: *res_idx = cur; tschatzl@7050: while (cur < max_length() && !is_available(cur)) { tschatzl@7050: cur++; tschatzl@7050: } tschatzl@7050: num_regions = cur - *res_idx; tschatzl@7050: #ifdef ASSERT tschatzl@7050: for (uint i = *res_idx; i < (*res_idx + num_regions); i++) { tschatzl@7050: assert(!is_available(i), "just checking"); tschatzl@7050: } tschatzl@7050: assert(cur == max_length() || num_regions == 0 || is_available(cur), tschatzl@7050: err_msg("The region at the current position %u must be available or at the end of the heap.", cur)); tschatzl@7050: #endif tschatzl@7050: return num_regions; tschatzl@7050: } tschatzl@7050: tschatzl@7091: uint HeapRegionManager::start_region_for_worker(uint worker_i, uint num_workers, uint num_regions) const { tschatzl@7050: return num_regions * worker_i / num_workers; tschatzl@7050: } tschatzl@7050: tschatzl@7091: void HeapRegionManager::par_iterate(HeapRegionClosure* blk, uint worker_id, uint num_workers, jint claim_value) const { tschatzl@7050: const uint start_index = start_region_for_worker(worker_id, num_workers, _allocated_heapregions_length); tschatzl@7050: tschatzl@7050: // Every worker will actually look at all regions, skipping over regions that tschatzl@7050: // are currently not committed. tschatzl@7050: // This also (potentially) iterates over regions newly allocated during GC. This tschatzl@7050: // is no problem except for some extra work. tschatzl@7050: for (uint count = 0; count < _allocated_heapregions_length; count++) { tschatzl@7050: const uint index = (start_index + count) % _allocated_heapregions_length; tschatzl@7050: assert(0 <= index && index < _allocated_heapregions_length, "sanity"); tschatzl@7050: // Skip over unavailable regions tschatzl@7050: if (!is_available(index)) { tschatzl@7050: continue; tschatzl@7050: } tschatzl@7050: HeapRegion* r = _regions.get_by_index(index); tschatzl@7050: // We'll ignore "continues humongous" regions (we'll process them tschatzl@7050: // when we come across their corresponding "start humongous" tschatzl@7050: // region) and regions already claimed. tschatzl@7050: if (r->claim_value() == claim_value || r->continuesHumongous()) { tschatzl@7050: continue; tschatzl@7050: } tschatzl@7050: // OK, try to claim it tschatzl@7050: if (!r->claimHeapRegion(claim_value)) { tschatzl@7050: continue; tschatzl@7050: } tschatzl@7050: // Success! tschatzl@7050: if (r->startsHumongous()) { tschatzl@7050: // If the region is "starts humongous" we'll iterate over its tschatzl@7050: // "continues humongous" first; in fact we'll do them tschatzl@7050: // first. The order is important. In one case, calling the tschatzl@7050: // closure on the "starts humongous" region might de-allocate tschatzl@7050: // and clear all its "continues humongous" regions and, as a tschatzl@7050: // result, we might end up processing them twice. So, we'll do tschatzl@7050: // them first (note: most closures will ignore them anyway) and tschatzl@7050: // then we'll do the "starts humongous" region. tschatzl@7050: for (uint ch_index = index + 1; ch_index < index + r->region_num(); ch_index++) { tschatzl@7050: HeapRegion* chr = _regions.get_by_index(ch_index); tschatzl@7050: tschatzl@7050: assert(chr->continuesHumongous(), "Must be humongous region"); tschatzl@7050: assert(chr->humongous_start_region() == r, tschatzl@7050: err_msg("Must work on humongous continuation of the original start region " tschatzl@7050: PTR_FORMAT ", but is " PTR_FORMAT, p2i(r), p2i(chr))); tschatzl@7050: assert(chr->claim_value() != claim_value, tschatzl@7050: "Must not have been claimed yet because claiming of humongous continuation first claims the start region"); tschatzl@7050: tschatzl@7050: bool claim_result = chr->claimHeapRegion(claim_value); tschatzl@7050: // We should always be able to claim it; no one else should tschatzl@7050: // be trying to claim this region. tschatzl@7050: guarantee(claim_result, "We should always be able to claim the continuesHumongous part of the humongous object"); tschatzl@7050: tschatzl@7050: bool res2 = blk->doHeapRegion(chr); tschatzl@7050: if (res2) { tschatzl@7050: return; tschatzl@7050: } tschatzl@7050: tschatzl@7050: // Right now, this holds (i.e., no closure that actually tschatzl@7050: // does something with "continues humongous" regions tschatzl@7050: // clears them). We might have to weaken it in the future, tschatzl@7050: // but let's leave these two asserts here for extra safety. tschatzl@7050: assert(chr->continuesHumongous(), "should still be the case"); tschatzl@7050: assert(chr->humongous_start_region() == r, "sanity"); tschatzl@7050: } tschatzl@7050: } tschatzl@7050: tschatzl@7050: bool res = blk->doHeapRegion(r); tschatzl@7050: if (res) { tschatzl@7050: return; tschatzl@7050: } tschatzl@7050: } tschatzl@7050: } tschatzl@7050: tschatzl@7091: uint HeapRegionManager::shrink_by(uint num_regions_to_remove) { tonyp@2963: assert(length() > 0, "the region sequence should not be empty"); tschatzl@7050: assert(length() <= _allocated_heapregions_length, "invariant"); tschatzl@7050: assert(_allocated_heapregions_length > 0, "we should have at least one region committed"); brutisso@5074: assert(num_regions_to_remove < length(), "We should never remove all regions"); ysr@777: tschatzl@7050: if (num_regions_to_remove == 0) { tschatzl@7050: return 0; tschatzl@7050: } tonyp@2963: tschatzl@7050: uint removed = 0; tschatzl@7050: uint cur = _allocated_heapregions_length - 1; tschatzl@7050: uint idx_last_found = 0; tschatzl@7050: uint num_last_found = 0; tschatzl@7050: tschatzl@7051: while ((removed < num_regions_to_remove) && tschatzl@7051: (num_last_found = find_empty_from_idx_reverse(cur, &idx_last_found)) > 0) { tschatzl@7050: uint to_remove = MIN2(num_regions_to_remove - removed, num_last_found); tschatzl@7050: tschatzl@7050: uncommit_regions(idx_last_found + num_last_found - to_remove, to_remove); tschatzl@7050: tschatzl@7050: cur -= num_last_found; tschatzl@7050: removed += to_remove; ysr@777: } brutisso@5074: tschatzl@7050: verify_optional(); tschatzl@7050: tschatzl@7050: return removed; ysr@777: } ysr@777: tschatzl@7091: uint HeapRegionManager::find_empty_from_idx_reverse(uint start_idx, uint* res_idx) const { tschatzl@7050: guarantee(start_idx < _allocated_heapregions_length, "checking"); tschatzl@7050: guarantee(res_idx != NULL, "checking"); tschatzl@7050: tschatzl@7050: uint num_regions_found = 0; tschatzl@7050: tschatzl@7050: jlong cur = start_idx; tschatzl@7050: while (cur != -1 && !(is_available(cur) && at(cur)->is_empty())) { tschatzl@7050: cur--; tschatzl@7050: } tschatzl@7050: if (cur == -1) { tschatzl@7050: return num_regions_found; tschatzl@7050: } tschatzl@7050: jlong old_cur = cur; tschatzl@7050: // cur indexes the first empty region tschatzl@7050: while (cur != -1 && is_available(cur) && at(cur)->is_empty()) { tschatzl@7050: cur--; tschatzl@7050: } tschatzl@7050: *res_idx = cur + 1; tschatzl@7050: num_regions_found = old_cur - cur; tschatzl@7050: tschatzl@7050: #ifdef ASSERT tschatzl@7050: for (uint i = *res_idx; i < (*res_idx + num_regions_found); i++) { tschatzl@7050: assert(at(i)->is_empty(), "just checking"); tschatzl@7050: } tschatzl@7050: #endif tschatzl@7050: return num_regions_found; tschatzl@7050: } tschatzl@7050: tschatzl@7091: void HeapRegionManager::verify() { tschatzl@7050: guarantee(length() <= _allocated_heapregions_length, tonyp@3713: err_msg("invariant: _length: %u _allocated_length: %u", tschatzl@7050: length(), _allocated_heapregions_length)); tschatzl@7050: guarantee(_allocated_heapregions_length <= max_length(), tonyp@3713: err_msg("invariant: _allocated_length: %u _max_length: %u", tschatzl@7050: _allocated_heapregions_length, max_length())); tonyp@2963: tschatzl@7050: bool prev_committed = true; tschatzl@7050: uint num_committed = 0; tschatzl@5773: HeapWord* prev_end = heap_bottom(); tschatzl@7050: for (uint i = 0; i < _allocated_heapregions_length; i++) { tschatzl@7050: if (!is_available(i)) { tschatzl@7050: prev_committed = false; tschatzl@7050: continue; tschatzl@7050: } tschatzl@7050: num_committed++; tschatzl@5773: HeapRegion* hr = _regions.get_by_index(i); tonyp@3713: guarantee(hr != NULL, err_msg("invariant: i: %u", i)); tschatzl@7050: guarantee(!prev_committed || hr->bottom() == prev_end, kevinw@9327: err_msg("invariant i: %u " HR_FORMAT " prev_end: " PTR_FORMAT, drchase@6680: i, HR_FORMAT_PARAMS(hr), p2i(prev_end))); tschatzl@7091: guarantee(hr->hrm_index() == i, tschatzl@7091: err_msg("invariant: i: %u hrm_index(): %u", i, hr->hrm_index())); tschatzl@7050: // Asserts will fire if i is >= _length tschatzl@7050: HeapWord* addr = hr->bottom(); tschatzl@7050: guarantee(addr_to_region(addr) == hr, "sanity"); tschatzl@7050: // We cannot check whether the region is part of a particular set: at the time tschatzl@7050: // this method may be called, we have only completed allocation of the regions, tschatzl@7050: // but not put into a region set. tschatzl@7050: prev_committed = true; tonyp@2963: if (hr->startsHumongous()) { tonyp@2963: prev_end = hr->orig_end(); tonyp@2963: } else { tonyp@2963: prev_end = hr->end(); tonyp@2963: } ysr@777: } tschatzl@7050: for (uint i = _allocated_heapregions_length; i < max_length(); i++) { tschatzl@5773: guarantee(_regions.get_by_index(i) == NULL, err_msg("invariant i: %u", i)); tonyp@2963: } tschatzl@7050: tschatzl@7050: guarantee(num_committed == _num_committed, err_msg("Found %u committed regions, but should be %u", num_committed, _num_committed)); tschatzl@7050: _free_list.verify(); tschatzl@7050: } tschatzl@7050: tschatzl@7050: #ifndef PRODUCT tschatzl@7091: void HeapRegionManager::verify_optional() { tschatzl@7050: verify(); ysr@777: } tonyp@2963: #endif // PRODUCT tschatzl@7050: