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/_compactibleFreeListSpace.cpp.incl" 27 28 ///////////////////////////////////////////////////////////////////////// 29 //// CompactibleFreeListSpace 30 ///////////////////////////////////////////////////////////////////////// 31 32 // highest ranked free list lock rank 33 int CompactibleFreeListSpace::_lockRank = Mutex::leaf + 3; 34 35 // Defaults are 0 so things will break badly if incorrectly initialized. 36 int CompactibleFreeListSpace::IndexSetStart = 0; 37 int CompactibleFreeListSpace::IndexSetStride = 0; 38 39 size_t MinChunkSize = 0; 40 41 void CompactibleFreeListSpace::set_cms_values() { 42 // Set CMS global values 43 assert(MinChunkSize == 0, "already set"); 44 #define numQuanta(x,y) ((x+y-1)/y) 45 MinChunkSize = numQuanta(sizeof(FreeChunk), MinObjAlignmentInBytes) * MinObjAlignment; 46 | 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/concurrentMarkSweep/cmsLockVerifier.hpp" 27 #include "gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp" 28 #include "gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.inline.hpp" 29 #include "gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp" 30 #include "gc_implementation/shared/liveRange.hpp" 31 #include "gc_implementation/shared/spaceDecorator.hpp" 32 #include "gc_interface/collectedHeap.hpp" 33 #include "memory/allocation.inline.hpp" 34 #include "memory/blockOffsetTable.inline.hpp" 35 #include "memory/resourceArea.hpp" 36 #include "memory/universe.inline.hpp" 37 #include "oops/oop.inline.hpp" 38 #include "runtime/globals.hpp" 39 #include "runtime/handles.inline.hpp" 40 #include "runtime/init.hpp" 41 #include "runtime/java.hpp" 42 #include "runtime/vmThread.hpp" 43 #include "utilities/copy.hpp" 44 45 ///////////////////////////////////////////////////////////////////////// 46 //// CompactibleFreeListSpace 47 ///////////////////////////////////////////////////////////////////////// 48 49 // highest ranked free list lock rank 50 int CompactibleFreeListSpace::_lockRank = Mutex::leaf + 3; 51 52 // Defaults are 0 so things will break badly if incorrectly initialized. 53 int CompactibleFreeListSpace::IndexSetStart = 0; 54 int CompactibleFreeListSpace::IndexSetStride = 0; 55 56 size_t MinChunkSize = 0; 57 58 void CompactibleFreeListSpace::set_cms_values() { 59 // Set CMS global values 60 assert(MinChunkSize == 0, "already set"); 61 #define numQuanta(x,y) ((x+y-1)/y) 62 MinChunkSize = numQuanta(sizeof(FreeChunk), MinObjAlignmentInBytes) * MinObjAlignment; 63 |