< prev index next >

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

Print this page

        

*** 36,58 **** // Interface to keep track of which regions G1 is currently allocating into. Provides // some accessors (e.g. allocating into them, or getting their occupancy). // Also keeps track of retained regions across GCs. class G1Allocator : public CHeapObj<mtGC> { friend class VMStructs; - private: - bool _survivor_is_full; - bool _old_is_full; protected: G1CollectedHeap* _g1h; virtual MutatorAllocRegion* mutator_alloc_region(AllocationContext_t context) = 0; ! virtual bool survivor_is_full(AllocationContext_t context) const; ! virtual bool old_is_full(AllocationContext_t context) const; ! virtual void set_survivor_full(AllocationContext_t context); ! virtual void set_old_full(AllocationContext_t context); // Accessors to the allocation regions. virtual SurvivorGCAllocRegion* survivor_gc_alloc_region(AllocationContext_t context) = 0; virtual OldGCAllocRegion* old_gc_alloc_region(AllocationContext_t context) = 0; --- 36,55 ---- // Interface to keep track of which regions G1 is currently allocating into. Provides // some accessors (e.g. allocating into them, or getting their occupancy). // Also keeps track of retained regions across GCs. class G1Allocator : public CHeapObj<mtGC> { friend class VMStructs; protected: G1CollectedHeap* _g1h; virtual MutatorAllocRegion* mutator_alloc_region(AllocationContext_t context) = 0; ! virtual bool survivor_is_full(AllocationContext_t context) const = 0; ! virtual bool old_is_full(AllocationContext_t context) const = 0; ! virtual void set_survivor_full(AllocationContext_t context) = 0; ! virtual void set_old_full(AllocationContext_t context) = 0; // Accessors to the allocation regions. virtual SurvivorGCAllocRegion* survivor_gc_alloc_region(AllocationContext_t context) = 0; virtual OldGCAllocRegion* old_gc_alloc_region(AllocationContext_t context) = 0;
*** 65,75 **** inline HeapWord* old_attempt_allocation(size_t min_word_size, size_t desired_word_size, size_t* actual_word_size, AllocationContext_t context); public: ! G1Allocator(G1CollectedHeap* heap) : _g1h(heap), _survivor_is_full(false), _old_is_full(false) { } virtual ~G1Allocator() { } static G1Allocator* create_allocator(G1CollectedHeap* g1h); #ifdef ASSERT --- 62,72 ---- inline HeapWord* old_attempt_allocation(size_t min_word_size, size_t desired_word_size, size_t* actual_word_size, AllocationContext_t context); public: ! G1Allocator(G1CollectedHeap* heap) : _g1h(heap) { } virtual ~G1Allocator() { } static G1Allocator* create_allocator(G1CollectedHeap* g1h); #ifdef ASSERT
*** 77,87 **** bool has_mutator_alloc_region(AllocationContext_t context) { return mutator_alloc_region(context)->get() != NULL; } #endif virtual void init_mutator_alloc_region() = 0; virtual void release_mutator_alloc_region() = 0; ! virtual void init_gc_alloc_regions(EvacuationInfo& evacuation_info); virtual void release_gc_alloc_regions(EvacuationInfo& evacuation_info) = 0; virtual void abandon_gc_alloc_regions() = 0; // Management of retained regions. --- 74,84 ---- bool has_mutator_alloc_region(AllocationContext_t context) { return mutator_alloc_region(context)->get() != NULL; } #endif virtual void init_mutator_alloc_region() = 0; virtual void release_mutator_alloc_region() = 0; ! virtual void init_gc_alloc_regions(EvacuationInfo& evacuation_info) = 0; virtual void release_gc_alloc_regions(EvacuationInfo& evacuation_info) = 0; virtual void abandon_gc_alloc_regions() = 0; // Management of retained regions.
*** 117,126 **** --- 114,126 ---- // The default allocation region manager for G1. Provides a single mutator, survivor // and old generation allocation region. // Can retain the (single) old generation allocation region across GCs. class G1DefaultAllocator : public G1Allocator { + private: + bool _survivor_is_full; + bool _old_is_full; protected: // Alloc region used to satisfy mutator allocation requests. MutatorAllocRegion _mutator_alloc_region; // Alloc region used to satisfy allocation requests by the GC for
*** 133,142 **** --- 133,148 ---- HeapRegion* _retained_old_gc_alloc_region; public: G1DefaultAllocator(G1CollectedHeap* heap); + virtual bool survivor_is_full(AllocationContext_t context) const; + virtual bool old_is_full(AllocationContext_t context) const ; + + virtual void set_survivor_full(AllocationContext_t context); + virtual void set_old_full(AllocationContext_t context); + virtual void init_mutator_alloc_region(); virtual void release_mutator_alloc_region(); virtual void init_gc_alloc_regions(EvacuationInfo& evacuation_info); virtual void release_gc_alloc_regions(EvacuationInfo& evacuation_info);
< prev index next >