hotspot/src/share/vm/gc_interface/collectedHeap.cpp
changeset 22552 a29022212180
parent 21561 c619b1cb4554
child 23464 ae470a2efd44
equal deleted inserted replaced
22551:9bf46d16dcc6 22552:a29022212180
   316     bs->write_region(deferred);
   316     bs->write_region(deferred);
   317     // "Clear" the deferred_card_mark field
   317     // "Clear" the deferred_card_mark field
   318     thread->set_deferred_card_mark(MemRegion());
   318     thread->set_deferred_card_mark(MemRegion());
   319   }
   319   }
   320   assert(thread->deferred_card_mark().is_empty(), "invariant");
   320   assert(thread->deferred_card_mark().is_empty(), "invariant");
       
   321 }
       
   322 
       
   323 size_t CollectedHeap::max_tlab_size() const {
       
   324   // TLABs can't be bigger than we can fill with a int[Integer.MAX_VALUE].
       
   325   // This restriction could be removed by enabling filling with multiple arrays.
       
   326   // If we compute that the reasonable way as
       
   327   //    header_size + ((sizeof(jint) * max_jint) / HeapWordSize)
       
   328   // we'll overflow on the multiply, so we do the divide first.
       
   329   // We actually lose a little by dividing first,
       
   330   // but that just makes the TLAB  somewhat smaller than the biggest array,
       
   331   // which is fine, since we'll be able to fill that.
       
   332   size_t max_int_size = typeArrayOopDesc::header_size(T_INT) +
       
   333               sizeof(jint) *
       
   334               ((juint) max_jint / (size_t) HeapWordSize);
       
   335   return align_size_down(max_int_size, MinObjAlignment);
   321 }
   336 }
   322 
   337 
   323 // Helper for ReduceInitialCardMarks. For performance,
   338 // Helper for ReduceInitialCardMarks. For performance,
   324 // compiled code may elide card-marks for initializing stores
   339 // compiled code may elide card-marks for initializing stores
   325 // to a newly allocated object along the fast-path. We
   340 // to a newly allocated object along the fast-path. We