--- old/share/gc/g1/heapRegionManager.hpp 2018-06-12 04:14:32.915190745 -0700 +++ new/share/gc/g1/heapRegionManager.hpp 2018-06-12 04:14:32.859190744 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -168,8 +168,14 @@ } HeapRegion* allocate_free_region(bool is_old) { - HeapRegion* hr = _free_list.remove_region(is_old); - + HeapRegion* hr = NULL; + if (os::has_nvdimm() && !is_old) { + hr = _free_list.show_tail(); + if ((address)(hr->top()) < os::dram_heapbase()) { + return NULL; + } + } + hr = _free_list.remove_region(is_old); if (hr != NULL) { assert(hr->next() == NULL, "Single region should not have next"); assert(is_available(hr->hrm_index()), "Must be committed");