110 return reserved().contains((void *)p);
111 }
112
113 MutableSpace* eden_space() const { return _eden_space; }
114 MutableSpace* from_space() const { return _from_space; }
115 MutableSpace* to_space() const { return _to_space; }
116 PSVirtualSpace* virtual_space() const { return _virtual_space; }
117
118 // For Adaptive size policy
119 size_t min_gen_size() { return _min_gen_size; }
120
121 // MarkSweep support
122 PSMarkSweepDecorator* eden_mark_sweep() const { return _eden_mark_sweep; }
123 PSMarkSweepDecorator* from_mark_sweep() const { return _from_mark_sweep; }
124 PSMarkSweepDecorator* to_mark_sweep() const { return _to_mark_sweep; }
125
126 void precompact();
127 void adjust_pointers();
128 void compact();
129
130 // Called during/after gc
131 void swap_spaces();
132
133 // Resize generation using suggested free space size and survivor size
134 // NOTE: "eden_size" and "survivor_size" are suggestions only. Current
135 // heap layout (particularly, live objects in from space) might
136 // not allow us to use these values.
137 void resize(size_t eden_size, size_t survivor_size);
138
139 // Size info
140 size_t capacity_in_bytes() const;
141 size_t used_in_bytes() const;
142 size_t free_in_bytes() const;
143
144 size_t capacity_in_words() const;
145 size_t used_in_words() const;
146 size_t free_in_words() const;
147
148 // The max this generation can grow to
149 size_t max_size() const { return _reserved.byte_size(); }
150
151 // The max this generation can grow to if the boundary between
152 // the generations are allowed to move.
153 size_t gen_size_limit() const { return _max_gen_size; }
154
155 bool is_maximal_no_gc() const {
156 return true; // never expands except at a GC
157 }
158
159 // Allocation
160 HeapWord* allocate(size_t word_size) {
161 HeapWord* result = eden_space()->cas_allocate(word_size);
162 return result;
163 }
164
165 HeapWord** top_addr() const { return eden_space()->top_addr(); }
166 HeapWord** end_addr() const { return eden_space()->end_addr(); }
167
168 // Iteration.
169 void oop_iterate(ExtendedOopClosure* cl);
170 void object_iterate(ObjectClosure* cl);
171
172 virtual void reset_after_change();
173 virtual void reset_survivors_after_shrink();
174
175 // Performance Counter support
176 void update_counters();
|
110 return reserved().contains((void *)p);
111 }
112
113 MutableSpace* eden_space() const { return _eden_space; }
114 MutableSpace* from_space() const { return _from_space; }
115 MutableSpace* to_space() const { return _to_space; }
116 PSVirtualSpace* virtual_space() const { return _virtual_space; }
117
118 // For Adaptive size policy
119 size_t min_gen_size() { return _min_gen_size; }
120
121 // MarkSweep support
122 PSMarkSweepDecorator* eden_mark_sweep() const { return _eden_mark_sweep; }
123 PSMarkSweepDecorator* from_mark_sweep() const { return _from_mark_sweep; }
124 PSMarkSweepDecorator* to_mark_sweep() const { return _to_mark_sweep; }
125
126 void precompact();
127 void adjust_pointers();
128 void compact();
129
130 // Called during/after GC
131 void swap_spaces();
132
133 // Resize generation using suggested free space size and survivor size
134 // NOTE: "eden_size" and "survivor_size" are suggestions only. Current
135 // heap layout (particularly, live objects in from space) might
136 // not allow us to use these values.
137 void resize(size_t eden_size, size_t survivor_size);
138
139 // Size info
140 size_t capacity_in_bytes() const;
141 size_t used_in_bytes() const;
142 size_t free_in_bytes() const;
143
144 size_t capacity_in_words() const;
145 size_t used_in_words() const;
146 size_t free_in_words() const;
147
148 // The max this generation can grow to
149 size_t max_size() const { return _reserved.byte_size(); }
150
151 // The max this generation can grow to if the boundary between
152 // the generations are allowed to move.
153 size_t gen_size_limit() const { return _max_gen_size; }
154
155 bool is_maximal_no_gc() const {
156 return true; // Never expands except at a GC
157 }
158
159 // Allocation
160 HeapWord* allocate(size_t word_size) {
161 HeapWord* result = eden_space()->cas_allocate(word_size);
162 return result;
163 }
164
165 HeapWord** top_addr() const { return eden_space()->top_addr(); }
166 HeapWord** end_addr() const { return eden_space()->end_addr(); }
167
168 // Iteration.
169 void oop_iterate(ExtendedOopClosure* cl);
170 void object_iterate(ObjectClosure* cl);
171
172 virtual void reset_after_change();
173 virtual void reset_survivors_after_shrink();
174
175 // Performance Counter support
176 void update_counters();
|