hotspot/src/share/vm/gc_interface/collectedHeap.hpp
changeset 2006 f2d2f0f20063
parent 1893 c82e388e17c5
child 2141 e9a644aaff87
child 2105 347008ce7984
equal deleted inserted replaced
2005:42075507972b 2006:f2d2f0f20063
    40 //   ParallelScavengeHeap
    40 //   ParallelScavengeHeap
    41 //
    41 //
    42 class CollectedHeap : public CHeapObj {
    42 class CollectedHeap : public CHeapObj {
    43   friend class VMStructs;
    43   friend class VMStructs;
    44   friend class IsGCActiveMark; // Block structured external access to _is_gc_active
    44   friend class IsGCActiveMark; // Block structured external access to _is_gc_active
       
    45   friend class constantPoolCacheKlass; // allocate() method inserts is_conc_safe
    45 
    46 
    46 #ifdef ASSERT
    47 #ifdef ASSERT
    47   static int       _fire_out_of_memory_count;
    48   static int       _fire_out_of_memory_count;
    48 #endif
    49 #endif
    49 
    50 
    80   virtual void accumulate_statistics_all_tlabs();
    81   virtual void accumulate_statistics_all_tlabs();
    81 
    82 
    82   // Reinitialize tlabs before resuming mutators.
    83   // Reinitialize tlabs before resuming mutators.
    83   virtual void resize_all_tlabs();
    84   virtual void resize_all_tlabs();
    84 
    85 
    85   debug_only(static void check_for_valid_allocation_state();)
       
    86 
       
    87  protected:
    86  protected:
    88   // Allocate from the current thread's TLAB, with broken-out slow path.
    87   // Allocate from the current thread's TLAB, with broken-out slow path.
    89   inline static HeapWord* allocate_from_tlab(Thread* thread, size_t size);
    88   inline static HeapWord* allocate_from_tlab(Thread* thread, size_t size);
    90   static HeapWord* allocate_from_tlab_slow(Thread* thread, size_t size);
    89   static HeapWord* allocate_from_tlab_slow(Thread* thread, size_t size);
    91 
    90 
   140   // Verification functions
   139   // Verification functions
   141   virtual void check_for_bad_heap_word_value(HeapWord* addr, size_t size)
   140   virtual void check_for_bad_heap_word_value(HeapWord* addr, size_t size)
   142     PRODUCT_RETURN;
   141     PRODUCT_RETURN;
   143   virtual void check_for_non_bad_heap_word_value(HeapWord* addr, size_t size)
   142   virtual void check_for_non_bad_heap_word_value(HeapWord* addr, size_t size)
   144     PRODUCT_RETURN;
   143     PRODUCT_RETURN;
       
   144   debug_only(static void check_for_valid_allocation_state();)
   145 
   145 
   146  public:
   146  public:
   147   enum Name {
   147   enum Name {
   148     Abstract,
   148     Abstract,
   149     SharedHeap,
   149     SharedHeap,