< prev index next >

src/share/vm/gc/g1/g1Allocator.cpp

Print this page
rev 12946 : imported patch 8177044-remove-scan-top


  92   _old_is_full = false;
  93 
  94   _survivor_gc_alloc_region.init();
  95   _old_gc_alloc_region.init();
  96   reuse_retained_old_region(evacuation_info,
  97                             &_old_gc_alloc_region,
  98                             &_retained_old_gc_alloc_region);
  99 }
 100 
 101 void G1DefaultAllocator::release_gc_alloc_regions(EvacuationInfo& evacuation_info) {
 102   AllocationContext_t context = AllocationContext::current();
 103   evacuation_info.set_allocation_regions(survivor_gc_alloc_region(context)->count() +
 104                                          old_gc_alloc_region(context)->count());
 105   survivor_gc_alloc_region(context)->release();
 106   // If we have an old GC alloc region to release, we'll save it in
 107   // _retained_old_gc_alloc_region. If we don't
 108   // _retained_old_gc_alloc_region will become NULL. This is what we
 109   // want either way so no reason to check explicitly for either
 110   // condition.
 111   _retained_old_gc_alloc_region = old_gc_alloc_region(context)->release();
 112   if (_retained_old_gc_alloc_region != NULL) {
 113     _retained_old_gc_alloc_region->record_retained_region();
 114   }
 115 }
 116 
 117 void G1DefaultAllocator::abandon_gc_alloc_regions() {
 118   assert(survivor_gc_alloc_region(AllocationContext::current())->get() == NULL, "pre-condition");
 119   assert(old_gc_alloc_region(AllocationContext::current())->get() == NULL, "pre-condition");
 120   _retained_old_gc_alloc_region = NULL;
 121 }
 122 
 123 bool G1DefaultAllocator::survivor_is_full(AllocationContext_t context) const {
 124   return _survivor_is_full;
 125 }
 126 
 127 bool G1DefaultAllocator::old_is_full(AllocationContext_t context) const {
 128   return _old_is_full;
 129 }
 130 
 131 void G1DefaultAllocator::set_survivor_full(AllocationContext_t context) {
 132   _survivor_is_full = true;
 133 }
 134 




  92   _old_is_full = false;
  93 
  94   _survivor_gc_alloc_region.init();
  95   _old_gc_alloc_region.init();
  96   reuse_retained_old_region(evacuation_info,
  97                             &_old_gc_alloc_region,
  98                             &_retained_old_gc_alloc_region);
  99 }
 100 
 101 void G1DefaultAllocator::release_gc_alloc_regions(EvacuationInfo& evacuation_info) {
 102   AllocationContext_t context = AllocationContext::current();
 103   evacuation_info.set_allocation_regions(survivor_gc_alloc_region(context)->count() +
 104                                          old_gc_alloc_region(context)->count());
 105   survivor_gc_alloc_region(context)->release();
 106   // If we have an old GC alloc region to release, we'll save it in
 107   // _retained_old_gc_alloc_region. If we don't
 108   // _retained_old_gc_alloc_region will become NULL. This is what we
 109   // want either way so no reason to check explicitly for either
 110   // condition.
 111   _retained_old_gc_alloc_region = old_gc_alloc_region(context)->release();



 112 }
 113 
 114 void G1DefaultAllocator::abandon_gc_alloc_regions() {
 115   assert(survivor_gc_alloc_region(AllocationContext::current())->get() == NULL, "pre-condition");
 116   assert(old_gc_alloc_region(AllocationContext::current())->get() == NULL, "pre-condition");
 117   _retained_old_gc_alloc_region = NULL;
 118 }
 119 
 120 bool G1DefaultAllocator::survivor_is_full(AllocationContext_t context) const {
 121   return _survivor_is_full;
 122 }
 123 
 124 bool G1DefaultAllocator::old_is_full(AllocationContext_t context) const {
 125   return _old_is_full;
 126 }
 127 
 128 void G1DefaultAllocator::set_survivor_full(AllocationContext_t context) {
 129   _survivor_is_full = true;
 130 }
 131 


< prev index next >