src/share/vm/memory/genCollectedHeap.hpp

Print this page




 205   }
 206 
 207   // Returns true if the reference is to an object in the reserved space
 208   // for the young generation.
 209   // Assumes the the young gen address range is less than that of the old gen.
 210   bool is_in_young(oop p);
 211 
 212 #ifdef ASSERT
 213   virtual bool is_in_partial_collection(const void* p);
 214 #endif
 215 
 216   virtual bool is_scavengable(const void* addr) {
 217     return is_in_young((oop)addr);
 218   }
 219 
 220   // Iteration functions.
 221   void oop_iterate(ExtendedOopClosure* cl);
 222   void oop_iterate(MemRegion mr, ExtendedOopClosure* cl);
 223   void object_iterate(ObjectClosure* cl);
 224   void safe_object_iterate(ObjectClosure* cl);
 225   void object_iterate_since_last_GC(ObjectClosure* cl);
 226   Space* space_containing(const void* addr) const;
 227 
 228   // A CollectedHeap is divided into a dense sequence of "blocks"; that is,
 229   // each address in the (reserved) heap is a member of exactly
 230   // one block.  The defining characteristic of a block is that it is
 231   // possible to find its size, and thus to progress forward to the next
 232   // block.  (Blocks may be of different sizes.)  Thus, blocks may
 233   // represent Java objects, or they might be free blocks in a
 234   // free-list-based heap (or subheap), as long as the two kinds are
 235   // distinguishable and the size of each is determinable.
 236 
 237   // Returns the address of the start of the "block" that contains the
 238   // address "addr".  We say "blocks" instead of "object" since some heaps
 239   // may not pack objects densely; a chunk may either be an object or a
 240   // non-object.
 241   virtual HeapWord* block_start(const void* addr) const;
 242 
 243   // Requires "addr" to be the start of a chunk, and returns its size.
 244   // "addr + size" is required to be the start of a new chunk, or the end
 245   // of the active area of the heap. Assumes (and verifies in non-product




 205   }
 206 
 207   // Returns true if the reference is to an object in the reserved space
 208   // for the young generation.
 209   // Assumes the the young gen address range is less than that of the old gen.
 210   bool is_in_young(oop p);
 211 
 212 #ifdef ASSERT
 213   virtual bool is_in_partial_collection(const void* p);
 214 #endif
 215 
 216   virtual bool is_scavengable(const void* addr) {
 217     return is_in_young((oop)addr);
 218   }
 219 
 220   // Iteration functions.
 221   void oop_iterate(ExtendedOopClosure* cl);
 222   void oop_iterate(MemRegion mr, ExtendedOopClosure* cl);
 223   void object_iterate(ObjectClosure* cl);
 224   void safe_object_iterate(ObjectClosure* cl);

 225   Space* space_containing(const void* addr) const;
 226 
 227   // A CollectedHeap is divided into a dense sequence of "blocks"; that is,
 228   // each address in the (reserved) heap is a member of exactly
 229   // one block.  The defining characteristic of a block is that it is
 230   // possible to find its size, and thus to progress forward to the next
 231   // block.  (Blocks may be of different sizes.)  Thus, blocks may
 232   // represent Java objects, or they might be free blocks in a
 233   // free-list-based heap (or subheap), as long as the two kinds are
 234   // distinguishable and the size of each is determinable.
 235 
 236   // Returns the address of the start of the "block" that contains the
 237   // address "addr".  We say "blocks" instead of "object" since some heaps
 238   // may not pack objects densely; a chunk may either be an object or a
 239   // non-object.
 240   virtual HeapWord* block_start(const void* addr) const;
 241 
 242   // Requires "addr" to be the start of a chunk, and returns its size.
 243   // "addr + size" is required to be the start of a new chunk, or the end
 244   // of the active area of the heap. Assumes (and verifies in non-product