Skip to content
Permalink
Browse files

8241830: Simplify commit error messages in G1PageBasedVirtualSpace

Reviewed-by: sjohanss, lkorinth, kbarrett
  • Loading branch information
cl4es committed Mar 31, 2020
1 parent 8fdf292 commit b31bea8a9983f520ba051608ac4e8806654fcf4e
Showing with 2 additions and 6 deletions.
  1. +2 −6 src/hotspot/share/gc/g1/g1PageBasedVirtualSpace.cpp
@@ -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) {

0 comments on commit b31bea8

Please sign in to comment.