57 static PSAdaptiveSizePolicy* _size_policy;
58 static PSGCAdaptivePolicyCounters* _gc_policy_counters;
59
60 GenerationSizer* _collector_policy;
61
62 // Collection of generations that are adjacent in the
63 // space reserved for the heap.
64 AdjoiningGenerations* _gens;
65 unsigned int _death_march_count;
66
67 // The task manager
68 static GCTaskManager* _gc_task_manager;
69
70 GCMemoryManager* _young_manager;
71 GCMemoryManager* _old_manager;
72
73 MemoryPool* _eden_pool;
74 MemoryPool* _survivor_pool;
75 MemoryPool* _old_pool;
76
77 void trace_heap(GCWhen::Type when, const GCTracer* tracer);
78
79 protected:
80 static inline size_t total_invocations();
81 HeapWord* allocate_new_tlab(size_t size);
82
83 inline bool should_alloc_in_eden(size_t size) const;
84 inline void death_march_check(HeapWord* const result, size_t size);
85 HeapWord* mem_allocate_old_gen(size_t size);
86
87 public:
88 ParallelScavengeHeap(GenerationSizer* policy) :
89 CollectedHeap(), _collector_policy(policy), _death_march_count(0) { }
90
91 // For use by VM operations
92 enum CollectionType {
93 Scavenge,
94 MarkSweep
95 };
96
|
57 static PSAdaptiveSizePolicy* _size_policy;
58 static PSGCAdaptivePolicyCounters* _gc_policy_counters;
59
60 GenerationSizer* _collector_policy;
61
62 // Collection of generations that are adjacent in the
63 // space reserved for the heap.
64 AdjoiningGenerations* _gens;
65 unsigned int _death_march_count;
66
67 // The task manager
68 static GCTaskManager* _gc_task_manager;
69
70 GCMemoryManager* _young_manager;
71 GCMemoryManager* _old_manager;
72
73 MemoryPool* _eden_pool;
74 MemoryPool* _survivor_pool;
75 MemoryPool* _old_pool;
76
77 virtual void initialize_serviceability();
78
79 void trace_heap(GCWhen::Type when, const GCTracer* tracer);
80
81 protected:
82 static inline size_t total_invocations();
83 HeapWord* allocate_new_tlab(size_t size);
84
85 inline bool should_alloc_in_eden(size_t size) const;
86 inline void death_march_check(HeapWord* const result, size_t size);
87 HeapWord* mem_allocate_old_gen(size_t size);
88
89 public:
90 ParallelScavengeHeap(GenerationSizer* policy) :
91 CollectedHeap(), _collector_policy(policy), _death_march_count(0) { }
92
93 // For use by VM operations
94 enum CollectionType {
95 Scavenge,
96 MarkSweep
97 };
98
|