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. 279 virtual HeapWord* block_start(const void* addr) const; 280 281 // Requires "addr" to be the start of a chunk, and returns its size. 282 // "addr + size" is required to be the start of a new chunk, or the end 283 // of the active area of the heap. Assumes (and verifies in non-product 284 // builds) that addr is in the allocated part of the heap and is 285 // the start of a chunk. 286 virtual size_t block_size(const HeapWord* addr) const; 287 288 // Requires "addr" to be the start of a block, and returns "TRUE" iff 289 // the block is an object. Assumes (and verifies in non-product 290 // builds) that addr is in the allocated part of the heap and is 291 // the start of a chunk. 292 virtual bool block_is_obj(const HeapWord* addr) const; 293 294 // Section on TLAB's. 295 virtual bool supports_tlab_allocation() const; 296 virtual size_t tlab_capacity(Thread* thr) const; 297 virtual size_t tlab_used(Thread* thr) const; 298 virtual size_t unsafe_max_tlab_alloc(Thread* thr) const; 299 virtual HeapWord* allocate_new_tlab(size_t min_size, 300 size_t requested_size, 301 size_t* actual_size); 302 303 // The "requestor" generation is performing some garbage collection 304 // action for which it would be useful to have scratch space. The 305 // requestor promises to allocate no more than "max_alloc_words" in any 306 // older generation (via promotion say.) Any blocks of space that can 307 // be provided are returned as a list of ScratchBlocks, sorted by | 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. 279 virtual HeapWord* block_start(const void* addr) const; 280 281 // Requires "addr" to be the start of a block, and returns "TRUE" iff 282 // the block is an object. Assumes (and verifies in non-product 283 // builds) that addr is in the allocated part of the heap and is 284 // the start of a chunk. 285 virtual bool block_is_obj(const HeapWord* addr) const; 286 287 // Section on TLAB's. 288 virtual bool supports_tlab_allocation() const; 289 virtual size_t tlab_capacity(Thread* thr) const; 290 virtual size_t tlab_used(Thread* thr) const; 291 virtual size_t unsafe_max_tlab_alloc(Thread* thr) const; 292 virtual HeapWord* allocate_new_tlab(size_t min_size, 293 size_t requested_size, 294 size_t* actual_size); 295 296 // The "requestor" generation is performing some garbage collection 297 // action for which it would be useful to have scratch space. The 298 // requestor promises to allocate no more than "max_alloc_words" in any 299 // older generation (via promotion say.) Any blocks of space that can 300 // be provided are returned as a list of ScratchBlocks, sorted by |