456 HeapWord* attempt_allocation_humongous(size_t word_size,
457 uint* gc_count_before_ret,
458 uint* gclocker_retry_count_ret);
459
460 // Allocation attempt that should be called during safepoints (e.g.,
461 // at the end of a successful GC). expect_null_mutator_alloc_region
462 // specifies whether the mutator alloc region is expected to be NULL
463 // or not.
464 HeapWord* attempt_allocation_at_safepoint(size_t word_size,
465 AllocationContext_t context,
466 bool expect_null_mutator_alloc_region);
467
468 // These methods are the "callbacks" from the G1AllocRegion class.
469
470 // For mutator alloc regions.
471 HeapRegion* new_mutator_alloc_region(size_t word_size, bool force);
472 void retire_mutator_alloc_region(HeapRegion* alloc_region,
473 size_t allocated_bytes);
474
475 // For GC alloc regions.
476 HeapRegion* new_gc_alloc_region(size_t word_size, uint count,
477 InCSetState dest);
478 void retire_gc_alloc_region(HeapRegion* alloc_region,
479 size_t allocated_bytes, InCSetState dest);
480
481 // - if explicit_gc is true, the GC is for a System.gc() etc,
482 // otherwise it's for a failed allocation.
483 // - if clear_all_soft_refs is true, all soft references should be
484 // cleared during the GC.
485 // - it returns false if it is unable to do the collection due to the
486 // GC locker being active, true otherwise.
487 bool do_full_collection(bool explicit_gc,
488 bool clear_all_soft_refs);
489
490 // Callback from VM_G1CollectFull operation, or collect_as_vm_thread.
491 virtual void do_full_collection(bool clear_all_soft_refs);
492
493 // Resize the heap if necessary after a full collection.
494 void resize_if_necessary_after_full_collection();
495
496 // Callback from VM_G1CollectForAllocation operation.
497 // This function does everything necessary/possible to satisfy a
|
456 HeapWord* attempt_allocation_humongous(size_t word_size,
457 uint* gc_count_before_ret,
458 uint* gclocker_retry_count_ret);
459
460 // Allocation attempt that should be called during safepoints (e.g.,
461 // at the end of a successful GC). expect_null_mutator_alloc_region
462 // specifies whether the mutator alloc region is expected to be NULL
463 // or not.
464 HeapWord* attempt_allocation_at_safepoint(size_t word_size,
465 AllocationContext_t context,
466 bool expect_null_mutator_alloc_region);
467
468 // These methods are the "callbacks" from the G1AllocRegion class.
469
470 // For mutator alloc regions.
471 HeapRegion* new_mutator_alloc_region(size_t word_size, bool force);
472 void retire_mutator_alloc_region(HeapRegion* alloc_region,
473 size_t allocated_bytes);
474
475 // For GC alloc regions.
476 HeapRegion* new_gc_alloc_region(size_t word_size, InCSetState dest);
477 void retire_gc_alloc_region(HeapRegion* alloc_region,
478 size_t allocated_bytes, InCSetState dest);
479
480 // - if explicit_gc is true, the GC is for a System.gc() etc,
481 // otherwise it's for a failed allocation.
482 // - if clear_all_soft_refs is true, all soft references should be
483 // cleared during the GC.
484 // - it returns false if it is unable to do the collection due to the
485 // GC locker being active, true otherwise.
486 bool do_full_collection(bool explicit_gc,
487 bool clear_all_soft_refs);
488
489 // Callback from VM_G1CollectFull operation, or collect_as_vm_thread.
490 virtual void do_full_collection(bool clear_all_soft_refs);
491
492 // Resize the heap if necessary after a full collection.
493 void resize_if_necessary_after_full_collection();
494
495 // Callback from VM_G1CollectForAllocation operation.
496 // This function does everything necessary/possible to satisfy a
|