242
243 // Returns true if the reference is to an object in the reserved space
244 // for the young generation.
245 // Assumes the the young gen address range is less than that of the old gen.
246 bool is_in_young(oop p);
247
248 #ifdef ASSERT
249 bool is_in_partial_collection(const void* p);
250 #endif
251
252 virtual bool is_scavengable(oop obj) {
253 return is_in_young(obj);
254 }
255
256 // Optimized nmethod scanning support routines
257 virtual void register_nmethod(nmethod* nm);
258 virtual void verify_nmethod(nmethod* nmethod);
259
260 // Iteration functions.
261 void oop_iterate_no_header(OopClosure* cl);
262 void oop_iterate(ExtendedOopClosure* cl);
263 void object_iterate(ObjectClosure* cl);
264 void safe_object_iterate(ObjectClosure* cl);
265 Space* space_containing(const void* addr) const;
266
267 // A CollectedHeap is divided into a dense sequence of "blocks"; that is,
268 // each address in the (reserved) heap is a member of exactly
269 // one block. The defining characteristic of a block is that it is
270 // possible to find its size, and thus to progress forward to the next
271 // block. (Blocks may be of different sizes.) Thus, blocks may
272 // represent Java objects, or they might be free blocks in a
273 // free-list-based heap (or subheap), as long as the two kinds are
274 // distinguishable and the size of each is determinable.
275
276 // Returns the address of the start of the "block" that contains the
277 // address "addr". We say "blocks" instead of "object" since some heaps
278 // may not pack objects densely; a chunk may either be an object or a
279 // non-object.
280 virtual HeapWord* block_start(const void* addr) const;
281
282 // Requires "addr" to be the start of a chunk, and returns its size.
|
242
243 // Returns true if the reference is to an object in the reserved space
244 // for the young generation.
245 // Assumes the the young gen address range is less than that of the old gen.
246 bool is_in_young(oop p);
247
248 #ifdef ASSERT
249 bool is_in_partial_collection(const void* p);
250 #endif
251
252 virtual bool is_scavengable(oop obj) {
253 return is_in_young(obj);
254 }
255
256 // Optimized nmethod scanning support routines
257 virtual void register_nmethod(nmethod* nm);
258 virtual void verify_nmethod(nmethod* nmethod);
259
260 // Iteration functions.
261 void oop_iterate_no_header(OopClosure* cl);
262 void oop_iterate(OopIterateClosure* cl);
263 void object_iterate(ObjectClosure* cl);
264 void safe_object_iterate(ObjectClosure* cl);
265 Space* space_containing(const void* addr) const;
266
267 // A CollectedHeap is divided into a dense sequence of "blocks"; that is,
268 // each address in the (reserved) heap is a member of exactly
269 // one block. The defining characteristic of a block is that it is
270 // possible to find its size, and thus to progress forward to the next
271 // block. (Blocks may be of different sizes.) Thus, blocks may
272 // represent Java objects, or they might be free blocks in a
273 // free-list-based heap (or subheap), as long as the two kinds are
274 // distinguishable and the size of each is determinable.
275
276 // Returns the address of the start of the "block" that contains the
277 // address "addr". We say "blocks" instead of "object" since some heaps
278 // may not pack objects densely; a chunk may either be an object or a
279 // non-object.
280 virtual HeapWord* block_start(const void* addr) const;
281
282 // Requires "addr" to be the start of a chunk, and returns its size.
|