diff --git a/src/hotspot/share/runtime/os.cpp b/src/hotspot/share/runtime/os.cpp index 0654bd3e092d8..5bb32493962b9 100644 --- a/src/hotspot/share/runtime/os.cpp +++ b/src/hotspot/share/runtime/os.cpp @@ -2017,7 +2017,7 @@ char* os::attempt_reserve_memory_between(char* min, char* max, size_t bytes, siz } char* const hi_end = MIN2(max, absolute_max); - if ((uintptr_t)hi_end < bytes) { + if ((uintptr_t)hi_end <= bytes) { return nullptr; // no need to go on } char* const hi_att = align_down(hi_end - bytes, alignment_adjusted);