src/share/vm/gc_interface/collectedHeap.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/gc_interface

src/share/vm/gc_interface/collectedHeap.cpp

Print this page




 458   DEBUG_ONLY(fill_args_check(start, words);)
 459   HandleMark hm;  // Free handles before leaving.
 460 
 461 #ifdef _LP64
 462   // A single array can fill ~8G, so multiple objects are needed only in 64-bit.
 463   // First fill with arrays, ensuring that any remaining space is big enough to
 464   // fill.  The remainder is filled with a single object.
 465   const size_t min = min_fill_size();
 466   const size_t max = filler_array_max_size();
 467   while (words > max) {
 468     const size_t cur = words - max >= min ? max : max - min;
 469     fill_with_array(start, cur, zap);
 470     start += cur;
 471     words -= cur;
 472   }
 473 #endif
 474 
 475   fill_with_object_impl(start, words, zap);
 476 }
 477 




 478 HeapWord* CollectedHeap::allocate_new_tlab(size_t size) {
 479   guarantee(false, "thread-local allocation buffers not supported");
 480   return NULL;
 481 }
 482 
 483 void CollectedHeap::ensure_parsability(bool retire_tlabs) {
 484   // The second disjunct in the assertion below makes a concession
 485   // for the start-up verification done while the VM is being
 486   // created. Callers be careful that you know that mutators
 487   // aren't going to interfere -- for instance, this is permissible
 488   // if we are still single-threaded and have either not yet
 489   // started allocating (nothing much to verify) or we have
 490   // started allocating but are now a full-fledged JavaThread
 491   // (and have thus made our TLAB's) available for filling.
 492   assert(SafepointSynchronize::is_at_safepoint() ||
 493          !is_init_completed(),
 494          "Should only be called at a safepoint or at start-up"
 495          " otherwise concurrent mutator activity may make heap "
 496          " unparsable again");
 497   const bool use_tlab = UseTLAB;




 458   DEBUG_ONLY(fill_args_check(start, words);)
 459   HandleMark hm;  // Free handles before leaving.
 460 
 461 #ifdef _LP64
 462   // A single array can fill ~8G, so multiple objects are needed only in 64-bit.
 463   // First fill with arrays, ensuring that any remaining space is big enough to
 464   // fill.  The remainder is filled with a single object.
 465   const size_t min = min_fill_size();
 466   const size_t max = filler_array_max_size();
 467   while (words > max) {
 468     const size_t cur = words - max >= min ? max : max - min;
 469     fill_with_array(start, cur, zap);
 470     start += cur;
 471     words -= cur;
 472   }
 473 #endif
 474 
 475   fill_with_object_impl(start, words, zap);
 476 }
 477 
 478 void CollectedHeap::post_initialize() {
 479   collector_policy()->post_heap_initialize();
 480 }
 481 
 482 HeapWord* CollectedHeap::allocate_new_tlab(size_t size) {
 483   guarantee(false, "thread-local allocation buffers not supported");
 484   return NULL;
 485 }
 486 
 487 void CollectedHeap::ensure_parsability(bool retire_tlabs) {
 488   // The second disjunct in the assertion below makes a concession
 489   // for the start-up verification done while the VM is being
 490   // created. Callers be careful that you know that mutators
 491   // aren't going to interfere -- for instance, this is permissible
 492   // if we are still single-threaded and have either not yet
 493   // started allocating (nothing much to verify) or we have
 494   // started allocating but are now a full-fledged JavaThread
 495   // (and have thus made our TLAB's) available for filling.
 496   assert(SafepointSynchronize::is_at_safepoint() ||
 497          !is_init_completed(),
 498          "Should only be called at a safepoint or at start-up"
 499          " otherwise concurrent mutator activity may make heap "
 500          " unparsable again");
 501   const bool use_tlab = UseTLAB;


src/share/vm/gc_interface/collectedHeap.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File