232 // Perform a full collection of generations up to and including max_generation. 233 // Mostly used for testing purposes. Caller does not hold the Heap_lock on entry. 234 void collect(GCCause::Cause cause, GenerationType max_generation); 235 236 // Returns "TRUE" iff "p" points into the committed areas of the heap. 237 // The methods is_in(), is_in_closed_subset() and is_in_youngest() may 238 // be expensive to compute in general, so, to prevent 239 // their inadvertent use in product jvm's, we restrict their use to 240 // assertion checking or verification only. 241 bool is_in(const void* p) const; 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(OopIterateClosure* cl); 262 void object_iterate(ObjectClosure* cl); 263 void safe_object_iterate(ObjectClosure* cl); 264 Space* space_containing(const void* addr) const; 265 266 // A CollectedHeap is divided into a dense sequence of "blocks"; that is, 267 // each address in the (reserved) heap is a member of exactly 268 // one block. The defining characteristic of a block is that it is 269 // possible to find its size, and thus to progress forward to the next 270 // block. (Blocks may be of different sizes.) Thus, blocks may 271 // represent Java objects, or they might be free blocks in a 272 // free-list-based heap (or subheap), as long as the two kinds are 273 // distinguishable and the size of each is determinable. 274 275 // Returns the address of the start of the "block" that contains the 276 // address "addr". We say "blocks" instead of "object" since some heaps 277 // may not pack objects densely; a chunk may either be an object or a 278 // non-object. | 232 // Perform a full collection of generations up to and including max_generation. 233 // Mostly used for testing purposes. Caller does not hold the Heap_lock on entry. 234 void collect(GCCause::Cause cause, GenerationType max_generation); 235 236 // Returns "TRUE" iff "p" points into the committed areas of the heap. 237 // The methods is_in(), is_in_closed_subset() and is_in_youngest() may 238 // be expensive to compute in general, so, to prevent 239 // their inadvertent use in product jvm's, we restrict their use to 240 // assertion checking or verification only. 241 bool is_in(const void* p) const; 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 // Optimized nmethod scanning support routines 253 virtual void register_nmethod(nmethod* nm); 254 virtual void unregister_nmethod(nmethod* nm); 255 virtual void verify_nmethod(nmethod* nm); 256 virtual void flush_nmethod(nmethod* nm); 257 258 void prune_nmethods(); 259 260 // Iteration functions. 261 void oop_iterate(OopIterateClosure* cl); 262 void object_iterate(ObjectClosure* cl); 263 void safe_object_iterate(ObjectClosure* cl); 264 Space* space_containing(const void* addr) const; 265 266 // A CollectedHeap is divided into a dense sequence of "blocks"; that is, 267 // each address in the (reserved) heap is a member of exactly 268 // one block. The defining characteristic of a block is that it is 269 // possible to find its size, and thus to progress forward to the next 270 // block. (Blocks may be of different sizes.) Thus, blocks may 271 // represent Java objects, or they might be free blocks in a 272 // free-list-based heap (or subheap), as long as the two kinds are 273 // distinguishable and the size of each is determinable. 274 275 // Returns the address of the start of the "block" that contains the 276 // address "addr". We say "blocks" instead of "object" since some heaps 277 // may not pack objects densely; a chunk may either be an object or a 278 // non-object. |