< prev index next >

src/hotspot/share/memory/virtualspace.cpp

Print this page

        

*** 190,200 **** if (failed_to_reserve_as_requested(base, requested_address, size, false, _fd_for_heap != -1)) { // OS ignored requested address. Try different address. base = NULL; } } else { ! base = os::reserve_memory(size, NULL, alignment, _fd_for_heap); } if (base == NULL) return; // Check alignment constraints --- 190,200 ---- if (failed_to_reserve_as_requested(base, requested_address, size, false, _fd_for_heap != -1)) { // OS ignored requested address. Try different address. base = NULL; } } else { ! base = os::reserve_memory(size, NULL, alignment, _fd_for_heap, _executable); } if (base == NULL) return; // Check alignment constraints
*** 982,1014 **** // Uncommit if (upper_needs > 0) { assert(middle_high_boundary() <= aligned_upper_new_high && aligned_upper_new_high + upper_needs <= upper_high_boundary(), "must not shrink beyond region"); ! if (!os::uncommit_memory(aligned_upper_new_high, upper_needs)) { debug_only(warning("os::uncommit_memory failed")); return; } else { _upper_high -= upper_needs; } } if (middle_needs > 0) { assert(lower_high_boundary() <= aligned_middle_new_high && aligned_middle_new_high + middle_needs <= middle_high_boundary(), "must not shrink beyond region"); ! if (!os::uncommit_memory(aligned_middle_new_high, middle_needs)) { debug_only(warning("os::uncommit_memory failed")); return; } else { _middle_high -= middle_needs; } } if (lower_needs > 0) { assert(low_boundary() <= aligned_lower_new_high && aligned_lower_new_high + lower_needs <= lower_high_boundary(), "must not shrink beyond region"); ! if (!os::uncommit_memory(aligned_lower_new_high, lower_needs)) { debug_only(warning("os::uncommit_memory failed")); return; } else { _lower_high -= lower_needs; } --- 982,1014 ---- // Uncommit if (upper_needs > 0) { assert(middle_high_boundary() <= aligned_upper_new_high && aligned_upper_new_high + upper_needs <= upper_high_boundary(), "must not shrink beyond region"); ! if (!os::uncommit_memory(aligned_upper_new_high, upper_needs, _executable)) { debug_only(warning("os::uncommit_memory failed")); return; } else { _upper_high -= upper_needs; } } if (middle_needs > 0) { assert(lower_high_boundary() <= aligned_middle_new_high && aligned_middle_new_high + middle_needs <= middle_high_boundary(), "must not shrink beyond region"); ! if (!os::uncommit_memory(aligned_middle_new_high, middle_needs, _executable)) { debug_only(warning("os::uncommit_memory failed")); return; } else { _middle_high -= middle_needs; } } if (lower_needs > 0) { assert(low_boundary() <= aligned_lower_new_high && aligned_lower_new_high + lower_needs <= lower_high_boundary(), "must not shrink beyond region"); ! if (!os::uncommit_memory(aligned_lower_new_high, lower_needs, _executable)) { debug_only(warning("os::uncommit_memory failed")); return; } else { _lower_high -= lower_needs; }
< prev index next >