< prev index next >

src/share/vm/memory/heap.cpp

Print this page

        

*** 110,120 **** page_size = MIN2(os::page_size_for_region_aligned(committed_size, min_pages), os::page_size_for_region_aligned(rs.size(), min_pages)); } const size_t granularity = os::vm_allocation_granularity(); ! const size_t c_size = align_size_up(committed_size, page_size); os::trace_page_sizes(_name, committed_size, rs.size(), page_size, rs.base(), rs.size()); if (!_memory.initialize(rs, c_size)) { return false; --- 110,120 ---- page_size = MIN2(os::page_size_for_region_aligned(committed_size, min_pages), os::page_size_for_region_aligned(rs.size(), min_pages)); } const size_t granularity = os::vm_allocation_granularity(); ! const size_t c_size = align_up(committed_size, page_size); os::trace_page_sizes(_name, committed_size, rs.size(), page_size, rs.base(), rs.size()); if (!_memory.initialize(rs, c_size)) { return false;
*** 123,133 **** on_code_mapping(_memory.low(), _memory.committed_size()); _number_of_committed_segments = size_to_segments(_memory.committed_size()); _number_of_reserved_segments = size_to_segments(_memory.reserved_size()); assert(_number_of_reserved_segments >= _number_of_committed_segments, "just checking"); const size_t reserved_segments_alignment = MAX2((size_t)os::vm_page_size(), granularity); ! const size_t reserved_segments_size = align_size_up(_number_of_reserved_segments, reserved_segments_alignment); const size_t committed_segments_size = align_to_page_size(_number_of_committed_segments); // reserve space for _segmap if (!_segmap.initialize(reserved_segments_size, committed_segments_size)) { return false; --- 123,133 ---- on_code_mapping(_memory.low(), _memory.committed_size()); _number_of_committed_segments = size_to_segments(_memory.committed_size()); _number_of_reserved_segments = size_to_segments(_memory.reserved_size()); assert(_number_of_reserved_segments >= _number_of_committed_segments, "just checking"); const size_t reserved_segments_alignment = MAX2((size_t)os::vm_page_size(), granularity); ! const size_t reserved_segments_size = align_up(_number_of_reserved_segments, reserved_segments_alignment); const size_t committed_segments_size = align_to_page_size(_number_of_committed_segments); // reserve space for _segmap if (!_segmap.initialize(reserved_segments_size, committed_segments_size)) { return false;
< prev index next >