tonyp@2472: /* tonyp@2962: * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. tonyp@2472: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. tonyp@2472: * tonyp@2472: * This code is free software; you can redistribute it and/or modify it tonyp@2472: * under the terms of the GNU General Public License version 2 only, as tonyp@2472: * published by the Free Software Foundation. tonyp@2472: * tonyp@2472: * This code is distributed in the hope that it will be useful, but WITHOUT tonyp@2472: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or tonyp@2472: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License tonyp@2472: * version 2 for more details (a copy is included in the LICENSE file that tonyp@2472: * accompanied this code). tonyp@2472: * tonyp@2472: * You should have received a copy of the GNU General Public License version tonyp@2472: * 2 along with this work; if not, write to the Free Software Foundation, tonyp@2472: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. tonyp@2472: * tonyp@2472: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA tonyp@2472: * or visit www.oracle.com if you need additional information or have any tonyp@2472: * questions. tonyp@2472: * tonyp@2472: */ tonyp@2472: tonyp@2472: #ifndef SHARE_VM_GC_IMPLEMENTATION_G1_HEAPREGIONSETS_HPP tonyp@2472: #define SHARE_VM_GC_IMPLEMENTATION_G1_HEAPREGIONSETS_HPP tonyp@2472: tonyp@2472: #include "gc_implementation/g1/heapRegionSet.inline.hpp" tonyp@2472: tonyp@2472: //////////////////// FreeRegionList //////////////////// tonyp@2472: tonyp@2472: class FreeRegionList : public HeapRegionLinkedList { tonyp@2472: protected: tonyp@2472: virtual const char* verify_region_extra(HeapRegion* hr); tonyp@2472: tonyp@2472: virtual bool regions_humongous() { return false; } tonyp@2472: virtual bool regions_empty() { return true; } tonyp@2472: tonyp@2472: public: tonyp@2472: FreeRegionList(const char* name) : HeapRegionLinkedList(name) { } tonyp@2472: }; tonyp@2472: tonyp@2472: //////////////////// MasterFreeRegionList //////////////////// tonyp@2472: tonyp@2472: class MasterFreeRegionList : public FreeRegionList { tonyp@2472: protected: tonyp@2974: virtual const char* verify_region_extra(HeapRegion* hr); tonyp@2472: virtual bool check_mt_safety(); tonyp@2472: tonyp@2472: public: tonyp@2472: MasterFreeRegionList(const char* name) : FreeRegionList(name) { } tonyp@2472: }; tonyp@2472: tonyp@2472: //////////////////// SecondaryFreeRegionList //////////////////// tonyp@2472: tonyp@2472: class SecondaryFreeRegionList : public FreeRegionList { tonyp@2472: protected: tonyp@2472: virtual bool check_mt_safety(); tonyp@2472: tonyp@2472: public: tonyp@2472: SecondaryFreeRegionList(const char* name) : FreeRegionList(name) { } tonyp@2472: }; tonyp@2472: tonyp@3268: //////////////////// OldRegionSet //////////////////// tonyp@3268: tonyp@3268: class OldRegionSet : public HeapRegionSet { tonyp@3268: protected: tonyp@3268: virtual const char* verify_region_extra(HeapRegion* hr); tonyp@3268: tonyp@3268: virtual bool regions_humongous() { return false; } tonyp@3268: virtual bool regions_empty() { return false; } tonyp@3268: tonyp@3268: public: tonyp@3268: OldRegionSet(const char* name) : HeapRegionSet(name) { } tonyp@3268: }; tonyp@3268: tonyp@3268: //////////////////// MasterOldRegionSet //////////////////// tonyp@3268: tonyp@3268: class MasterOldRegionSet : public OldRegionSet { tonyp@3268: private: tonyp@3268: protected: tonyp@3268: virtual bool check_mt_safety(); tonyp@3268: tonyp@3268: public: tonyp@3268: MasterOldRegionSet(const char* name) : OldRegionSet(name) { } tonyp@3268: }; tonyp@3268: tonyp@2472: //////////////////// HumongousRegionSet //////////////////// tonyp@2472: tonyp@2472: class HumongousRegionSet : public HeapRegionSet { tonyp@2472: protected: tonyp@2472: virtual const char* verify_region_extra(HeapRegion* hr); tonyp@2472: tonyp@2472: virtual bool regions_humongous() { return true; } tonyp@2472: virtual bool regions_empty() { return false; } tonyp@2472: tonyp@2472: public: tonyp@2472: HumongousRegionSet(const char* name) : HeapRegionSet(name) { } tonyp@2472: }; tonyp@2472: tonyp@2472: //////////////////// MasterHumongousRegionSet //////////////////// tonyp@2472: tonyp@2472: class MasterHumongousRegionSet : public HumongousRegionSet { tonyp@2472: protected: tonyp@2472: virtual bool check_mt_safety(); tonyp@2472: tonyp@2472: public: tonyp@2472: MasterHumongousRegionSet(const char* name) : HumongousRegionSet(name) { } tonyp@2472: }; tonyp@2472: tonyp@2472: #endif // SHARE_VM_GC_IMPLEMENTATION_G1_HEAPREGIONSETS_HPP