1 /* 2 * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 # include "incls/_precompiled.incl" 26 # include "incls/_asPSOldGen.cpp.incl" 27 28 // Whereas PSOldGen takes the maximum size of the generation 29 // (which doesn't change in the case of PSOldGen) as a parameter, 30 // ASPSOldGen takes the upper limit on the size of 31 // the generation as a parameter. In ASPSOldGen the 32 // maximum size of the generation can change as the boundary 33 // moves. The "maximum size of the generation" is still a valid 34 // concept since the generation can grow and shrink within that 35 // maximum. There are lots of useful checks that use that 36 // maximum. In PSOldGen the method max_gen_size() returns 37 // _max_gen_size (as set by the PSOldGen constructor). This 38 // is how it always worked. In ASPSOldGen max_gen_size() 39 // returned the size of the reserved space for the generation. 40 // That can change as the boundary moves. Below the limit of 41 // the size of the generation is passed to the PSOldGen constructor 42 // for "_max_gen_size" (have to pass something) but it is not used later. 43 // 44 ASPSOldGen::ASPSOldGen(size_t initial_size, 45 size_t min_size, 46 size_t size_limit, | 1 /* 2 * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 #include "precompiled.hpp" 26 #include "gc_implementation/parallelScavenge/asPSOldGen.hpp" 27 #include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp" 28 #include "gc_implementation/parallelScavenge/psAdaptiveSizePolicy.hpp" 29 #include "gc_implementation/parallelScavenge/psMarkSweepDecorator.hpp" 30 #include "memory/cardTableModRefBS.hpp" 31 #include "oops/oop.inline.hpp" 32 #include "runtime/java.hpp" 33 34 // Whereas PSOldGen takes the maximum size of the generation 35 // (which doesn't change in the case of PSOldGen) as a parameter, 36 // ASPSOldGen takes the upper limit on the size of 37 // the generation as a parameter. In ASPSOldGen the 38 // maximum size of the generation can change as the boundary 39 // moves. The "maximum size of the generation" is still a valid 40 // concept since the generation can grow and shrink within that 41 // maximum. There are lots of useful checks that use that 42 // maximum. In PSOldGen the method max_gen_size() returns 43 // _max_gen_size (as set by the PSOldGen constructor). This 44 // is how it always worked. In ASPSOldGen max_gen_size() 45 // returned the size of the reserved space for the generation. 46 // That can change as the boundary moves. Below the limit of 47 // the size of the generation is passed to the PSOldGen constructor 48 // for "_max_gen_size" (have to pass something) but it is not used later. 49 // 50 ASPSOldGen::ASPSOldGen(size_t initial_size, 51 size_t min_size, 52 size_t size_limit, |