src/hotspot/share/gc/shared/oopStorage.hpp
changeset 57975 a333fdeb8de0
parent 55569 8e3a0ebf3497
child 58679 9c3209ff7550
equal deleted inserted replaced
57974:1262b3ddd7e4 57975:a333fdeb8de0
   181   // Declare, but not define, the public class OopStorage::TestAccess.
   181   // Declare, but not define, the public class OopStorage::TestAccess.
   182   // That class is defined as part of the unit-test. It "exports" the needed
   182   // That class is defined as part of the unit-test. It "exports" the needed
   183   // private types by providing public typedefs for them.
   183   // private types by providing public typedefs for them.
   184   class TestAccess;
   184   class TestAccess;
   185 
   185 
   186   // xlC on AIX can't compile test_oopStorage.cpp with following private
   186 private:
   187   // classes. C++03 introduced access for nested classes with DR45, but xlC
       
   188   // version 12 rejects it.
       
   189 NOT_AIX( private: )
       
   190   class Block;                  // Fixed-size array of oops, plus bookkeeping.
   187   class Block;                  // Fixed-size array of oops, plus bookkeeping.
   191   class ActiveArray;            // Array of Blocks, plus bookkeeping.
   188   class ActiveArray;            // Array of Blocks, plus bookkeeping.
   192   class AllocationListEntry;    // Provides AllocationList links in a Block.
   189   class AllocationListEntry;    // Provides AllocationList links in a Block.
   193 
   190 
   194   // Doubly-linked list of Blocks.
   191   // Doubly-linked list of Blocks.
   222 
   219 
   223 private:
   220 private:
   224   const char* _name;
   221   const char* _name;
   225   ActiveArray* _active_array;
   222   ActiveArray* _active_array;
   226   AllocationList _allocation_list;
   223   AllocationList _allocation_list;
   227 AIX_ONLY(public:)               // xlC 12 on AIX doesn't implement C++ DR45.
       
   228   Block* volatile _deferred_updates;
   224   Block* volatile _deferred_updates;
   229 AIX_ONLY(private:)
       
   230 
       
   231   Mutex* _allocation_mutex;
   225   Mutex* _allocation_mutex;
   232   Mutex* _active_mutex;
   226   Mutex* _active_mutex;
   233 
   227 
   234   // Volatile for racy unlocked accesses.
   228   // Volatile for racy unlocked accesses.
   235   volatile size_t _allocation_count;
   229   volatile size_t _allocation_count;
   246   Block* block_for_allocation();
   240   Block* block_for_allocation();
   247 
   241 
   248   Block* find_block_or_null(const oop* ptr) const;
   242   Block* find_block_or_null(const oop* ptr) const;
   249   void delete_empty_block(const Block& block);
   243   void delete_empty_block(const Block& block);
   250   bool reduce_deferred_updates();
   244   bool reduce_deferred_updates();
   251 AIX_ONLY(public:)               // xlC 12 on AIX doesn't implement C++ DR45.
       
   252   void record_needs_cleanup();
   245   void record_needs_cleanup();
   253 AIX_ONLY(private:)
       
   254 
   246 
   255   // Managing _active_array.
   247   // Managing _active_array.
   256   bool expand_active_array();
   248   bool expand_active_array();
   257   void replace_active_array(ActiveArray* new_array);
   249   void replace_active_array(ActiveArray* new_array);
   258   ActiveArray* obtain_active_array() const;
   250   ActiveArray* obtain_active_array() const;