< prev index next >

src/hotspot/share/gc/shared/oopStorage.hpp

Print this page
rev 50951 : imported patch rename_AllocateList
rev 50952 : imported patch rename_AllocateEntry
rev 50954 : imported patch rename_allocate_list
rev 50955 : imported patch rename_allocate_mutex
rev 50956 : [mq]: fix_more_comments

*** 71,81 **** // interactions for this protocol. Similarly, see the allocate() function for // a discussion of allocation. class OopStorage : public CHeapObj<mtGC> { public: ! OopStorage(const char* name, Mutex* allocate_mutex, Mutex* active_mutex); ~OopStorage(); // These count and usage accessors are racy unless at a safepoint. // The number of allocated and not yet released entries. --- 71,81 ---- // interactions for this protocol. Similarly, see the allocate() function for // a discussion of allocation. class OopStorage : public CHeapObj<mtGC> { public: ! OopStorage(const char* name, Mutex* allocation_mutex, Mutex* active_mutex); ~OopStorage(); // These count and usage accessors are racy unless at a safepoint. // The number of allocated and not yet released entries.
*** 92,107 **** INVALID_ENTRY, UNALLOCATED_ENTRY, ALLOCATED_ENTRY }; ! // Locks _allocate_mutex. // precondition: ptr != NULL. EntryStatus allocation_status(const oop* ptr) const; // Allocates and returns a new entry. Returns NULL if memory allocation ! // failed. Locks _allocate_mutex. // postcondition: *result == NULL. oop* allocate(); // Deallocates ptr. No locking. // precondition: ptr is a valid allocated entry. --- 92,107 ---- INVALID_ENTRY, UNALLOCATED_ENTRY, ALLOCATED_ENTRY }; ! // Locks _allocation_mutex. // precondition: ptr != NULL. EntryStatus allocation_status(const oop* ptr) const; // Allocates and returns a new entry. Returns NULL if memory allocation ! // failed. Locks _allocation_mutex. // postcondition: *result == NULL. oop* allocate(); // Deallocates ptr. No locking. // precondition: ptr is a valid allocated entry.
*** 150,160 **** // Other clients must use serial iteration. template<bool concurrent, bool is_const> class ParState; // Block cleanup functions are for the exclusive use of the GC. // Both stop deleting if there is an in-progress concurrent iteration. ! // Concurrent deletion locks both the allocate_mutex and the active_mutex. void delete_empty_blocks_safepoint(); void delete_empty_blocks_concurrent(); // Debugging and logging support. const char* name() const; --- 150,160 ---- // Other clients must use serial iteration. template<bool concurrent, bool is_const> class ParState; // Block cleanup functions are for the exclusive use of the GC. // Both stop deleting if there is an in-progress concurrent iteration. ! // Concurrent deletion locks both the _allocation_mutex and the _active_mutex. void delete_empty_blocks_safepoint(); void delete_empty_blocks_concurrent(); // Debugging and logging support. const char* name() const;
*** 170,193 **** // classes. C++03 introduced access for nested classes with DR45, but xlC // version 12 rejects it. NOT_AIX( private: ) class Block; // Fixed-size array of oops, plus bookkeeping. class ActiveArray; // Array of Blocks, plus bookkeeping. ! class AllocateEntry; // Provides AllocateList links in a Block. // Doubly-linked list of Blocks. ! class AllocateList { const Block* _head; const Block* _tail; // Noncopyable. ! AllocateList(const AllocateList&); ! AllocateList& operator=(const AllocateList&); public: ! AllocateList(); ! ~AllocateList(); Block* head(); Block* tail(); const Block* chead() const; const Block* ctail() const; --- 170,193 ---- // classes. C++03 introduced access for nested classes with DR45, but xlC // version 12 rejects it. NOT_AIX( private: ) class Block; // Fixed-size array of oops, plus bookkeeping. class ActiveArray; // Array of Blocks, plus bookkeeping. ! class AllocationListEntry; // Provides AllocationList links in a Block. // Doubly-linked list of Blocks. ! class AllocationList { const Block* _head; const Block* _tail; // Noncopyable. ! AllocationList(const AllocationList&); ! AllocationList& operator=(const AllocationList&); public: ! AllocationList(); ! ~AllocationList(); Block* head(); Block* tail(); const Block* chead() const; const Block* ctail() const;
*** 217,230 **** }; private: const char* _name; ActiveArray* _active_array; ! AllocateList _allocate_list; Block* volatile _deferred_updates; ! Mutex* _allocate_mutex; Mutex* _active_mutex; // Volatile for racy unlocked accesses. volatile size_t _allocation_count; --- 217,230 ---- }; private: const char* _name; ActiveArray* _active_array; ! AllocationList _allocation_list; Block* volatile _deferred_updates; ! Mutex* _allocation_mutex; Mutex* _active_mutex; // Volatile for racy unlocked accesses. volatile size_t _allocation_count;
< prev index next >