Skip to content

Commit 5d84865

Browse files
committed
Guard touching in os::reserve_memory_special with UseZGC
1 parent 2287146 commit 5d84865

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/hotspot/os/linux/os_linux.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4228,7 +4228,9 @@ char* os::pd_reserve_memory_special(size_t bytes, size_t alignment, size_t page_
42284228
if (addr != nullptr) {
42294229
if (UseNUMAInterleaving) {
42304230
numa_make_global(addr, bytes);
4231-
} else {
4231+
}
4232+
4233+
if (UseZGC) {
42324234
// Large pages are committed during reservation so that they are reserved for us.
42334235
// However, under special circumstances we might overreserve pages, so we must
42344236
// also make sure that we can back those pages immediately, not only reserve them.

0 commit comments

Comments
 (0)