--- old/src/hotspot/share/memory/universe.cpp 2018-09-19 09:03:35.391697400 -0700 +++ new/src/hotspot/share/memory/universe.cpp 2018-09-19 09:03:34.155592600 -0700 @@ -807,13 +807,15 @@ assert(!UseCompressedOops || (total_reserved <= (OopEncodingHeapMax - os::vm_page_size())), "heap size is too big for compressed oops"); - // When AllocateOldGenAt is set, we cannot use largepages for entire heap memory. - // Only young gen which is allocated in dram can use large pages, but we currently don't support that. - bool use_large_pages = (AllocateOldGenAt != NULL) && UseLargePages && is_aligned(alignment, os::large_page_size()); + bool use_large_pages = UseLargePages && is_aligned(alignment, os::large_page_size()); assert(!UseLargePages || UseParallelGC || use_large_pages, "Wrong alignment to use large pages"); + // When AllocateOldGenAt is set, we cannot use largepages for entire heap memory. + // Only young gen which is allocated in dram can use large pages, but we currently don't support that. + use_large_pages = (AllocateOldGenAt != NULL) ? false : use_large_pages; + // Now create the space. ReservedHeapSpace total_rs(total_reserved, alignment, use_large_pages, AllocateHeapAt);