195 #else
196 p += oop(p)->size() + BrooksPointer::word_size();
197 #endif
198 }
199 }
200
201 HeapWord* ShenandoahHeapRegion::object_iterate_careful(ObjectClosureCareful* blk) {
202 HeapWord * limit = concurrent_iteration_safe_limit();
203 assert(limit <= top(), "sanity check");
204 for (HeapWord* p = bottom() + BrooksPointer::word_size(); p < limit;) {
205 size_t size = blk->do_object_careful(oop(p));
206 if (size == 0) {
207 return p; // failed at p
208 } else {
209 p += size + BrooksPointer::word_size();
210 }
211 }
212 return NULL; // all done
213 }
214
215 void ShenandoahHeapRegion::fill_region() {
216 ShenandoahHeap* sh = (ShenandoahHeap*) Universe::heap();
217
218 if (free() > (BrooksPointer::word_size() + CollectedHeap::min_fill_size())) {
219 HeapWord* filler = allocate(BrooksPointer::word_size());
220 HeapWord* obj = allocate(end() - top());
221 sh->fill_with_object(obj, end() - obj);
222 BrooksPointer::initialize(oop(obj));
223 }
224 }
225
226 void ShenandoahHeapRegion::set_humongous_start(bool start) {
227 _humongous_start = start;
228 }
229
230 void ShenandoahHeapRegion::set_humongous_continuation(bool continuation) {
231 _humongous_continuation = continuation;
232 }
233
234 bool ShenandoahHeapRegion::is_humongous() const {
|
195 #else
196 p += oop(p)->size() + BrooksPointer::word_size();
197 #endif
198 }
199 }
200
201 HeapWord* ShenandoahHeapRegion::object_iterate_careful(ObjectClosureCareful* blk) {
202 HeapWord * limit = concurrent_iteration_safe_limit();
203 assert(limit <= top(), "sanity check");
204 for (HeapWord* p = bottom() + BrooksPointer::word_size(); p < limit;) {
205 size_t size = blk->do_object_careful(oop(p));
206 if (size == 0) {
207 return p; // failed at p
208 } else {
209 p += size + BrooksPointer::word_size();
210 }
211 }
212 return NULL; // all done
213 }
214
215 void ShenandoahHeapRegion::oop_iterate(ExtendedOopClosure* blk) {
216 if (is_empty()) return;
217 HeapWord* obj_addr = bottom() + BrooksPointer::word_size();
218 HeapWord* t = top();
219 // Could call objects iterate, but this is easier.
220 while (obj_addr < t) {
221 oop obj = oop(obj_addr);
222 obj_addr += obj->oop_iterate_size(blk) + BrooksPointer::word_size();
223 }
224 }
225
226 void ShenandoahHeapRegion::fill_region() {
227 ShenandoahHeap* sh = (ShenandoahHeap*) Universe::heap();
228
229 if (free() > (BrooksPointer::word_size() + CollectedHeap::min_fill_size())) {
230 HeapWord* filler = allocate(BrooksPointer::word_size());
231 HeapWord* obj = allocate(end() - top());
232 sh->fill_with_object(obj, end() - obj);
233 BrooksPointer::initialize(oop(obj));
234 }
235 }
236
237 void ShenandoahHeapRegion::set_humongous_start(bool start) {
238 _humongous_start = start;
239 }
240
241 void ShenandoahHeapRegion::set_humongous_continuation(bool continuation) {
242 _humongous_continuation = continuation;
243 }
244
245 bool ShenandoahHeapRegion::is_humongous() const {
|