--- old/src/hotspot/os/linux/os_linux.cpp 2018-06-07 13:23:30.684747202 -0400 +++ new/src/hotspot/os/linux/os_linux.cpp 2018-06-07 13:23:30.565746842 -0400 @@ -3118,7 +3118,9 @@ int loops = (pages + stripe - 1) / stripe; int committed_pages = 0; address loop_base = start; - for (int index = 0; index < loops; index ++) { + bool found_range = false; + + for (int index = 0; index < loops && !found_range; index ++) { assert(pages > 0, "Nothing to do"); int pages_to_query = (pages >= stripe) ? stripe : pages; pages -= pages_to_query; @@ -3139,6 +3141,7 @@ if ((vec[vecIdx] & 0x01) == 0) { // not committed // End of current contiguous region if (committed_start != NULL) { + found_range = true; break; } } else { // committed