191 |
191 |
192 // Iterate over all objects in the space, calling "cl.do_object" on |
192 // Iterate over all objects in the space, calling "cl.do_object" on |
193 // each. Objects allocated by applications of the closure are not |
193 // each. Objects allocated by applications of the closure are not |
194 // included in the iteration. |
194 // included in the iteration. |
195 virtual void object_iterate(ObjectClosure* blk) = 0; |
195 virtual void object_iterate(ObjectClosure* blk) = 0; |
|
196 // Similar to object_iterate() except only iterates over |
|
197 // objects whose internal references point to objects in the space. |
|
198 virtual void safe_object_iterate(ObjectClosure* blk) = 0; |
196 |
199 |
197 // Iterate over all objects that intersect with mr, calling "cl->do_object" |
200 // Iterate over all objects that intersect with mr, calling "cl->do_object" |
198 // on each. There is an exception to this: if this closure has already |
201 // on each. There is an exception to this: if this closure has already |
199 // been invoked on an object, it may skip such objects in some cases. This is |
202 // been invoked on an object, it may skip such objects in some cases. This is |
200 // Most likely to happen in an "upwards" (ascending address) iteration of |
203 // Most likely to happen in an "upwards" (ascending address) iteration of |
841 |
844 |
842 // Iteration |
845 // Iteration |
843 void oop_iterate(OopClosure* cl); |
846 void oop_iterate(OopClosure* cl); |
844 void oop_iterate(MemRegion mr, OopClosure* cl); |
847 void oop_iterate(MemRegion mr, OopClosure* cl); |
845 void object_iterate(ObjectClosure* blk); |
848 void object_iterate(ObjectClosure* blk); |
|
849 // For contiguous spaces this method will iterate safely over objects |
|
850 // in the space (i.e., between bottom and top) when at a safepoint. |
|
851 void safe_object_iterate(ObjectClosure* blk); |
846 void object_iterate_mem(MemRegion mr, UpwardsObjectClosure* cl); |
852 void object_iterate_mem(MemRegion mr, UpwardsObjectClosure* cl); |
847 // iterates on objects up to the safe limit |
853 // iterates on objects up to the safe limit |
848 HeapWord* object_iterate_careful(ObjectClosureCareful* cl); |
854 HeapWord* object_iterate_careful(ObjectClosureCareful* cl); |
849 inline HeapWord* concurrent_iteration_safe_limit(); |
855 inline HeapWord* concurrent_iteration_safe_limit(); |
850 // changes the safe limit, all objects from bottom() to the new |
856 // changes the safe limit, all objects from bottom() to the new |