Skip to content

Commit 4de2d3c

Browse files
committed
8301862: G1: Remove G1PageBasedVirtualSpace::_executable
Reviewed-by: tschatzl, lkorinth
1 parent e628fd5 commit 4de2d3c

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

src/hotspot/share/gc/g1/g1PageBasedVirtualSpace.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@
3636

3737
G1PageBasedVirtualSpace::G1PageBasedVirtualSpace(ReservedSpace rs, size_t used_size, size_t page_size) :
3838
_low_boundary(NULL), _high_boundary(NULL), _tail_size(0), _page_size(0),
39-
_committed(mtGC), _dirty(mtGC), _special(false), _executable(false) {
39+
_committed(mtGC), _dirty(mtGC), _special(false) {
40+
assert(!rs.executable(), "precondition");
4041
initialize_with_page_size(rs, used_size, page_size);
4142
}
4243

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

6162
_special = rs.special();
62-
_executable = rs.executable();
6363

6464
_page_size = page_size;
6565

@@ -79,7 +79,6 @@ G1PageBasedVirtualSpace::~G1PageBasedVirtualSpace() {
7979
_low_boundary = NULL;
8080
_high_boundary = NULL;
8181
_special = false;
82-
_executable = false;
8382
_page_size = 0;
8483
_tail_size = 0;
8584
}
@@ -140,14 +139,14 @@ void G1PageBasedVirtualSpace::commit_preferred_pages(size_t start, size_t num_pa
140139
char* start_addr = page_start(start);
141140
size_t size = num_pages * _page_size;
142141

143-
os::commit_memory_or_exit(start_addr, size, _page_size, _executable, "G1 virtual space");
142+
os::commit_memory_or_exit(start_addr, size, _page_size, false, "G1 virtual space");
144143
}
145144

146145
void G1PageBasedVirtualSpace::commit_tail() {
147146
vmassert(_tail_size > 0, "The size of the tail area must be > 0 when reaching here");
148147

149148
char* const aligned_end_address = align_down(_high_boundary, _page_size);
150-
os::commit_memory_or_exit(aligned_end_address, _tail_size, os::vm_page_size(), _executable, "G1 virtual space");
149+
os::commit_memory_or_exit(aligned_end_address, _tail_size, os::vm_page_size(), false, "G1 virtual space");
151150
}
152151

153152
void G1PageBasedVirtualSpace::commit_internal(size_t start_page, size_t end_page) {

src/hotspot/share/gc/g1/g1PageBasedVirtualSpace.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,6 @@ class G1PageBasedVirtualSpace {
7171
// os::commit_memory() or os::uncommit_memory() have no function.
7272
bool _special;
7373

74-
// Indicates whether the committed space should be executable.
75-
bool _executable;
76-
7774
// Helper function for committing memory. Commit the given memory range by using
7875
// _page_size pages as much as possible and the remainder with small sized pages.
7976
void commit_internal(size_t start_page, size_t end_page);

0 commit comments

Comments
 (0)