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 #ifndef SERIALGC 26 27 // A HeapRegion is the smallest piece of a G1CollectedHeap that 28 // can be collected independently. 29 30 // NOTE: Although a HeapRegion is a Space, its 31 // Space::initDirtyCardClosure method must not be called. 32 // The problem is that the existence of this method breaks 33 // the independence of barrier sets from remembered sets. 34 // The solution is to remove this method from the definition 35 // of a Space. 36 37 class CompactibleSpace; 38 class ContiguousSpace; 39 class HeapRegionRemSet; 40 class HeapRegionRemSetIterator; 41 class HeapRegion; 42 43 // A dirty card to oop closure for heap regions. It 44 // knows how to get the G1 heap and how to use the bitmap 937 assert(new_list->tl() == NULL || new_list->tl()->is_on_unclean_list(), 938 "Better already be marked as on unclean list"); 939 assert(new_list->hd() == NULL || !new_list->hd()->is_on_free_list(), 940 "Better not already be on free list"); 941 assert(new_list->hd() == NULL || new_list->hd()->is_on_unclean_list(), 942 "Better already be marked as on unclean list"); 943 EmptyNonHRegionList::prepend_list(new_list); 944 } 945 HeapRegion* pop() { 946 HeapRegion* res = RegionList::pop(); 947 if (res != NULL) res->set_on_unclean_list(false); 948 return res; 949 } 950 }; 951 952 // Local Variables: *** 953 // c-indentation-style: gnu *** 954 // End: *** 955 956 #endif // SERIALGC | 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 #ifndef SHARE_VM_GC_IMPLEMENTATION_G1_HEAPREGION_HPP 26 #define SHARE_VM_GC_IMPLEMENTATION_G1_HEAPREGION_HPP 27 28 #include "gc_implementation/g1/g1BlockOffsetTable.inline.hpp" 29 #include "gc_implementation/g1/g1_specialized_oop_closures.hpp" 30 #include "gc_implementation/g1/survRateGroup.hpp" 31 #include "gc_implementation/shared/ageTable.hpp" 32 #include "gc_implementation/shared/spaceDecorator.hpp" 33 #include "memory/space.inline.hpp" 34 #include "memory/watermark.hpp" 35 36 #ifndef SERIALGC 37 38 // A HeapRegion is the smallest piece of a G1CollectedHeap that 39 // can be collected independently. 40 41 // NOTE: Although a HeapRegion is a Space, its 42 // Space::initDirtyCardClosure method must not be called. 43 // The problem is that the existence of this method breaks 44 // the independence of barrier sets from remembered sets. 45 // The solution is to remove this method from the definition 46 // of a Space. 47 48 class CompactibleSpace; 49 class ContiguousSpace; 50 class HeapRegionRemSet; 51 class HeapRegionRemSetIterator; 52 class HeapRegion; 53 54 // A dirty card to oop closure for heap regions. It 55 // knows how to get the G1 heap and how to use the bitmap 948 assert(new_list->tl() == NULL || new_list->tl()->is_on_unclean_list(), 949 "Better already be marked as on unclean list"); 950 assert(new_list->hd() == NULL || !new_list->hd()->is_on_free_list(), 951 "Better not already be on free list"); 952 assert(new_list->hd() == NULL || new_list->hd()->is_on_unclean_list(), 953 "Better already be marked as on unclean list"); 954 EmptyNonHRegionList::prepend_list(new_list); 955 } 956 HeapRegion* pop() { 957 HeapRegion* res = RegionList::pop(); 958 if (res != NULL) res->set_on_unclean_list(false); 959 return res; 960 } 961 }; 962 963 // Local Variables: *** 964 // c-indentation-style: gnu *** 965 // End: *** 966 967 #endif // SERIALGC 968 969 #endif // SHARE_VM_GC_IMPLEMENTATION_G1_HEAPREGION_HPP |