--- old/src/share/vm/runtime/os.cpp 2014-12-17 15:24:48.164461287 +0100 +++ new/src/share/vm/runtime/os.cpp 2014-12-17 15:24:48.095459301 +0100 @@ -1590,7 +1590,7 @@ void os::pretouch_memory(char* start, char* end) { for (volatile char *p = start; p < end; p += os::vm_page_size()) { - char t = *p; *p = t; + *p = 0; } } --- old/src/share/vm/runtime/os.hpp 2014-12-17 15:24:48.551472427 +0100 +++ new/src/share/vm/runtime/os.hpp 2014-12-17 15:24:48.482470441 +0100 @@ -311,6 +311,10 @@ static bool uncommit_memory(char* addr, size_t bytes); static bool release_memory(char* addr, size_t bytes); + // Touch memory pages that cover the memory range from start to end (exclusive) + // to make the OS back the memory range with actual memory. + // Current implementation may not touch the last page if unaligned addresses + // are passed. static void pretouch_memory(char* start, char* end); enum ProtType { MEM_PROT_NONE, MEM_PROT_READ, MEM_PROT_RW, MEM_PROT_RWX };