8241830: Simplify commit error messages in G1PageBasedVirtualSpace

Reviewed-by: sjohanss, lkorinth, kbarrett
This commit is contained in:
Claes Redestad 2020-03-31 16:09:26 +02:00
parent 8fdf2925d1
commit b31bea8a99

View File

@ -145,18 +145,14 @@ void G1PageBasedVirtualSpace::commit_preferred_pages(size_t start, size_t num_pa
char* start_addr = page_start(start);
size_t size = num_pages * _page_size;
os::commit_memory_or_exit(start_addr, size, _page_size, _executable,
err_msg("Failed to commit area from " PTR_FORMAT " to " PTR_FORMAT " of length " SIZE_FORMAT ".",
p2i(start_addr), p2i(start_addr + size), size));
os::commit_memory_or_exit(start_addr, size, _page_size, _executable, "G1 virtual space");
}
void G1PageBasedVirtualSpace::commit_tail() {
vmassert(_tail_size > 0, "The size of the tail area must be > 0 when reaching here");
char* const aligned_end_address = align_down(_high_boundary, _page_size);
os::commit_memory_or_exit(aligned_end_address, _tail_size, os::vm_page_size(), _executable,
err_msg("Failed to commit tail area from " PTR_FORMAT " to " PTR_FORMAT " of length " SIZE_FORMAT ".",
p2i(aligned_end_address), p2i(_high_boundary), _tail_size));
os::commit_memory_or_exit(aligned_end_address, _tail_size, os::vm_page_size(), _executable, "G1 virtual space");
}
void G1PageBasedVirtualSpace::commit_internal(size_t start_page, size_t end_page) {