src/share/vm/gc/g1/g1CollectedHeap.hpp

Print this page




 555   //   GC locker being active, true otherwise
 556   bool do_collection(bool explicit_gc,
 557                      bool clear_all_soft_refs,
 558                      size_t word_size);
 559 
 560   // Callback from VM_G1CollectFull operation.
 561   // Perform a full collection.
 562   virtual void do_full_collection(bool clear_all_soft_refs);
 563 
 564   // Resize the heap if necessary after a full collection.  If this is
 565   // after a collect-for allocation, "word_size" is the allocation size,
 566   // and will be considered part of the used portion of the heap.
 567   void resize_if_necessary_after_full_collection(size_t word_size);
 568 
 569   // Callback from VM_G1CollectForAllocation operation.
 570   // This function does everything necessary/possible to satisfy a
 571   // failed allocation request (including collection, expansion, etc.)
 572   HeapWord* satisfy_failed_allocation(size_t word_size,
 573                                       AllocationContext_t context,
 574                                       bool* succeeded);








 575 

 576   // Attempting to expand the heap sufficiently
 577   // to support an allocation of the given "word_size".  If
 578   // successful, perform the allocation and return the address of the
 579   // allocated block, or else "NULL".
 580   HeapWord* expand_and_allocate(size_t word_size, AllocationContext_t context);
 581 
 582   // Process any reference objects discovered during
 583   // an incremental evacuation pause.
 584   void process_discovered_references();
 585 
 586   // Enqueue any remaining discovered references
 587   // after processing.
 588   void enqueue_discovered_references();
 589 
 590 public:
 591   WorkGang* workers() const { return _workers; }
 592 
 593   G1Allocator* allocator() {
 594     return _allocator;
 595   }




 555   //   GC locker being active, true otherwise
 556   bool do_collection(bool explicit_gc,
 557                      bool clear_all_soft_refs,
 558                      size_t word_size);
 559 
 560   // Callback from VM_G1CollectFull operation.
 561   // Perform a full collection.
 562   virtual void do_full_collection(bool clear_all_soft_refs);
 563 
 564   // Resize the heap if necessary after a full collection.  If this is
 565   // after a collect-for allocation, "word_size" is the allocation size,
 566   // and will be considered part of the used portion of the heap.
 567   void resize_if_necessary_after_full_collection(size_t word_size);
 568 
 569   // Callback from VM_G1CollectForAllocation operation.
 570   // This function does everything necessary/possible to satisfy a
 571   // failed allocation request (including collection, expansion, etc.)
 572   HeapWord* satisfy_failed_allocation(size_t word_size,
 573                                       AllocationContext_t context,
 574                                       bool* succeeded);
 575 private:
 576   // Helper method for satisfy_failed_allocation()
 577   HeapWord* satisfy_failed_allocation_helper(size_t word_size,
 578                                              AllocationContext_t context,
 579                                              bool do_gc,
 580                                              bool clear_all_soft_refs,
 581                                              bool expect_null_mutator_alloc_region,
 582                                              bool* gc_succeeded);
 583 
 584 protected:
 585   // Attempting to expand the heap sufficiently
 586   // to support an allocation of the given "word_size".  If
 587   // successful, perform the allocation and return the address of the
 588   // allocated block, or else "NULL".
 589   HeapWord* expand_and_allocate(size_t word_size, AllocationContext_t context);
 590 
 591   // Process any reference objects discovered during
 592   // an incremental evacuation pause.
 593   void process_discovered_references();
 594 
 595   // Enqueue any remaining discovered references
 596   // after processing.
 597   void enqueue_discovered_references();
 598 
 599 public:
 600   WorkGang* workers() const { return _workers; }
 601 
 602   G1Allocator* allocator() {
 603     return _allocator;
 604   }