Skip to content

Commit

Permalink
8301862: G1: Remove G1PageBasedVirtualSpace::_executable
Browse files Browse the repository at this point in the history
Reviewed-by: tschatzl, lkorinth
  • Loading branch information
albertnetymk committed Feb 8, 2023
1 parent e628fd5 commit 4de2d3c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
9 changes: 4 additions & 5 deletions src/hotspot/share/gc/g1/g1PageBasedVirtualSpace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@

G1PageBasedVirtualSpace::G1PageBasedVirtualSpace(ReservedSpace rs, size_t used_size, size_t page_size) :
_low_boundary(NULL), _high_boundary(NULL), _tail_size(0), _page_size(0),
_committed(mtGC), _dirty(mtGC), _special(false), _executable(false) {
_committed(mtGC), _dirty(mtGC), _special(false) {
assert(!rs.executable(), "precondition");
initialize_with_page_size(rs, used_size, page_size);
}

Expand All @@ -59,7 +60,6 @@ void G1PageBasedVirtualSpace::initialize_with_page_size(ReservedSpace rs, size_t
_high_boundary = _low_boundary + used_size;

_special = rs.special();
_executable = rs.executable();

_page_size = page_size;

Expand All @@ -79,7 +79,6 @@ G1PageBasedVirtualSpace::~G1PageBasedVirtualSpace() {
_low_boundary = NULL;
_high_boundary = NULL;
_special = false;
_executable = false;
_page_size = 0;
_tail_size = 0;
}
Expand Down Expand Up @@ -140,14 +139,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, "G1 virtual space");
os::commit_memory_or_exit(start_addr, size, _page_size, false, "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, "G1 virtual space");
os::commit_memory_or_exit(aligned_end_address, _tail_size, os::vm_page_size(), false, "G1 virtual space");
}

void G1PageBasedVirtualSpace::commit_internal(size_t start_page, size_t end_page) {
Expand Down
3 changes: 0 additions & 3 deletions src/hotspot/share/gc/g1/g1PageBasedVirtualSpace.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,6 @@ class G1PageBasedVirtualSpace {
// os::commit_memory() or os::uncommit_memory() have no function.
bool _special;

// Indicates whether the committed space should be executable.
bool _executable;

// Helper function for committing memory. Commit the given memory range by using
// _page_size pages as much as possible and the remainder with small sized pages.
void commit_internal(size_t start_page, size_t end_page);
Expand Down

1 comment on commit 4de2d3c

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.