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;




 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   // Helper method for satisfy_failed_allocation()
 576   // Calls Full GC, allocate and expand methods. 
 577   HeapWord* satisfy_failed_allocation_helper(size_t word_size,
 578                                       AllocationContext_t context,
 579                                       bool clear_all_soft_refs,
 580                                       bool* succeeded);
 581 
 582   // Attempting to expand the heap sufficiently
 583   // to support an allocation of the given "word_size".  If
 584   // successful, perform the allocation and return the address of the
 585   // allocated block, or else "NULL".
 586   HeapWord* expand_and_allocate(size_t word_size, AllocationContext_t context);
 587 
 588   // Process any reference objects discovered during
 589   // an incremental evacuation pause.
 590   void process_discovered_references();
 591 
 592   // Enqueue any remaining discovered references
 593   // after processing.
 594   void enqueue_discovered_references();
 595 
 596 public:
 597   WorkGang* workers() const { return _workers; }
 598 
 599   G1Allocator* allocator() {
 600     return _allocator;