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