src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File
*** old/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Thu Aug 22 13:03:58 2013
--- new/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Thu Aug 22 13:03:58 2013

*** 2017,2030 **** --- 2017,2032 ---- // HeapWordSize). guarantee(HeapWordSize == wordSize, "HeapWordSize must equal wordSize"); size_t init_byte_size = collector_policy()->initial_heap_byte_size(); size_t max_byte_size = collector_policy()->max_heap_byte_size(); + size_t heap_alignment = collector_policy()->max_alignment(); // Ensure that the sizes are properly aligned. Universe::check_alignment(init_byte_size, HeapRegion::GrainBytes, "g1 heap"); Universe::check_alignment(max_byte_size, HeapRegion::GrainBytes, "g1 heap"); + Universe::check_alignment(max_byte_size, heap_alignment, "g1 heap"); _cg1r = new ConcurrentG1Refine(this); // Reserve the maximum.
*** 2037,2052 **** --- 2039,2050 ---- // base of the reserved heap may end up differing from the // address that was requested (i.e. the preferred heap base). // If this happens then we could end up using a non-optimal // compressed oops mode. // Since max_byte_size is aligned to the size of a heap region (checked // above). Universe::check_alignment(max_byte_size, HeapRegion::GrainBytes, "g1 heap"); ReservedSpace heap_rs = Universe::reserve_heap(max_byte_size, ! HeapRegion::GrainBytes); ! heap_alignment); // It is important to do this in a way such that concurrent readers can't // temporarily think something is in the heap. (I've actually seen this // happen in asserts: DLD.) _reserved.set_word_size(0);

src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File