--- old/share/gc/parallel/adjoiningVirtualSpaces.cpp 2018-06-15 09:47:38.058912444 -0700 +++ new/share/gc/parallel/adjoiningVirtualSpaces.cpp 2018-06-15 09:47:38.034912443 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -46,9 +46,16 @@ ReservedSpace young_rs = _reserved_space.last_part(max_low_byte_size); _low = new PSVirtualSpace(old_rs, alignment()); - if (!_low->expand_by(init_low_byte_size)) { - vm_exit_during_initialization("Could not reserve enough space for " - "object heap"); + if (os::has_nvdimm() && UseParallelOldGC) { + if (!_low->expand_by(init_low_byte_size, _nvdimm_fd)) { + vm_exit_during_initialization("Could not reserve enough space for " + "object heap"); + } + } else { + if (!_low->expand_by(init_low_byte_size)) { + vm_exit_during_initialization("Could not reserve enough space for " + "object heap"); + } } _high = new PSVirtualSpaceHighToLow(young_rs, alignment()); @@ -60,7 +67,12 @@ bool AdjoiningVirtualSpaces::adjust_boundary_up(size_t change_in_bytes) { assert(UseAdaptiveSizePolicy && UseAdaptiveGCBoundary, "runtime check"); - size_t actual_change = low()->expand_into(high(), change_in_bytes); + size_t actual_change = 0; + if (os::has_nvdimm() && UseParallelOldGC) { + actual_change = low()->expand_into(high(), change_in_bytes, nvdimm_fd()); + } else { + actual_change = low()->expand_into(high(), change_in_bytes); + } return actual_change != 0; }