< prev index next >

share/gc/parallel/adjoiningVirtualSpaces.cpp

Print this page
rev 1 : G1GC+POGC+NVDIMM Patch with latest comments incorporated from all.

*** 1,7 **** /* ! * Copyright (c) 2003, 2015, 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 44,68 **** // The reserved spaces for the two parts of the virtual space. ReservedSpace old_rs = _reserved_space.first_part(max_low_byte_size); 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"); } _high = new PSVirtualSpaceHighToLow(young_rs, alignment()); if (!_high->expand_by(init_high_byte_size)) { vm_exit_during_initialization("Could not reserve enough space for " "object heap"); } } 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); return actual_change != 0; } bool AdjoiningVirtualSpaces::adjust_boundary_down(size_t change_in_bytes) { assert(UseAdaptiveSizePolicy && UseAdaptiveGCBoundary, "runtime check"); --- 44,80 ---- // The reserved spaces for the two parts of the virtual space. ReservedSpace old_rs = _reserved_space.first_part(max_low_byte_size); ReservedSpace young_rs = _reserved_space.last_part(max_low_byte_size); _low = new PSVirtualSpace(old_rs, alignment()); + 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()); if (!_high->expand_by(init_high_byte_size)) { vm_exit_during_initialization("Could not reserve enough space for " "object heap"); } } bool AdjoiningVirtualSpaces::adjust_boundary_up(size_t change_in_bytes) { assert(UseAdaptiveSizePolicy && UseAdaptiveGCBoundary, "runtime check"); ! 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; } bool AdjoiningVirtualSpaces::adjust_boundary_down(size_t change_in_bytes) { assert(UseAdaptiveSizePolicy && UseAdaptiveGCBoundary, "runtime check");
< prev index next >