Mercurial > hg > graal-jvmci-8
diff src/share/vm/gc_implementation/g1/g1RegionToSpaceMapper.cpp @ 22811:06face256a8c
8062063: Usage of UseHugeTLBFS, UseLargePagesInMetaspace and huge SurvivorAlignmentInBytes cause crashes in CMBitMapClosure::do_bit
Summary: Making sure committed memory is cleared when re-committed, even if using large pages.
Reviewed-by: jwilhelm, tschatzl
author | sjohanss |
---|---|
date | Mon, 12 Jan 2015 15:24:29 +0100 |
parents | e7d0505c8a30 |
children | 33e421924c67 |
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/g1RegionToSpaceMapper.cpp Fri Dec 12 09:07:54 2014 +0100 +++ b/src/share/vm/gc_implementation/g1/g1RegionToSpaceMapper.cpp Mon Jan 12 15:24:29 2015 +0100 @@ -67,9 +67,9 @@ } virtual void commit_regions(uintptr_t start_idx, size_t num_regions) { - _storage.commit(start_idx * _pages_per_region, num_regions * _pages_per_region); + bool zero_filled = _storage.commit(start_idx * _pages_per_region, num_regions * _pages_per_region); _commit_map.set_range(start_idx, start_idx + num_regions); - fire_on_commit(start_idx, num_regions, true); + fire_on_commit(start_idx, num_regions, zero_filled); } virtual void uncommit_regions(uintptr_t start_idx, size_t num_regions) { @@ -117,8 +117,7 @@ uint old_refcount = _refcounts.get_by_index(idx); bool zero_filled = false; if (old_refcount == 0) { - _storage.commit(idx, 1); - zero_filled = true; + zero_filled = _storage.commit(idx, 1); } _refcounts.set_by_index(idx, old_refcount + 1); _commit_map.set_bit(i);