< prev index next >

src/share/vm/memory/space.hpp

Print this page
rev 7420 : [mq]: removeOneContigSpaceGeneration
rev 7421 : imported patch kim-review


 478 
 479   // Frequently calls adjust_obj_size().
 480   template <class SpaceType>
 481   static inline void scan_and_adjust_pointers(SpaceType* space);
 482 
 483   // Frequently calls obj_size().
 484   template <class SpaceType>
 485   static inline void scan_and_compact(SpaceType* space);
 486 
 487   // Frequently calls scanned_block_is_obj() and scanned_block_size().
 488   // Requires the scan_limit() function.
 489   template <class SpaceType>
 490   static inline void scan_and_forward(SpaceType* space, CompactPoint* cp);
 491 };
 492 
 493 class GenSpaceMangler;
 494 
 495 // A space in which the free area is contiguous.  It therefore supports
 496 // faster allocation, and compaction.
 497 class ContiguousSpace: public CompactibleSpace {
 498   friend class OneContigSpaceCardGeneration;
 499   friend class VMStructs;
 500   // Allow scan_and_forward function to call (private) overrides for auxiliary functions on this class
 501   template <typename SpaceType>
 502   friend void CompactibleSpace::scan_and_forward(SpaceType* space, CompactPoint* cp);
 503 
 504  private:
 505   // Auxiliary functions for scan_and_forward support.
 506   // See comments for CompactibleSpace for more information.
 507   inline HeapWord* scan_limit() const {
 508     return top();
 509   }
 510 
 511   inline bool scanned_block_is_obj(const HeapWord* addr) const {
 512     return true; // Always true, since scan_limit is top
 513   }
 514 
 515   inline size_t scanned_block_size(const HeapWord* addr) const {
 516     return oop(addr)->size();
 517   }
 518 




 478 
 479   // Frequently calls adjust_obj_size().
 480   template <class SpaceType>
 481   static inline void scan_and_adjust_pointers(SpaceType* space);
 482 
 483   // Frequently calls obj_size().
 484   template <class SpaceType>
 485   static inline void scan_and_compact(SpaceType* space);
 486 
 487   // Frequently calls scanned_block_is_obj() and scanned_block_size().
 488   // Requires the scan_limit() function.
 489   template <class SpaceType>
 490   static inline void scan_and_forward(SpaceType* space, CompactPoint* cp);
 491 };
 492 
 493 class GenSpaceMangler;
 494 
 495 // A space in which the free area is contiguous.  It therefore supports
 496 // faster allocation, and compaction.
 497 class ContiguousSpace: public CompactibleSpace {

 498   friend class VMStructs;
 499   // Allow scan_and_forward function to call (private) overrides for auxiliary functions on this class
 500   template <typename SpaceType>
 501   friend void CompactibleSpace::scan_and_forward(SpaceType* space, CompactPoint* cp);
 502 
 503  private:
 504   // Auxiliary functions for scan_and_forward support.
 505   // See comments for CompactibleSpace for more information.
 506   inline HeapWord* scan_limit() const {
 507     return top();
 508   }
 509 
 510   inline bool scanned_block_is_obj(const HeapWord* addr) const {
 511     return true; // Always true, since scan_limit is top
 512   }
 513 
 514   inline size_t scanned_block_size(const HeapWord* addr) const {
 515     return oop(addr)->size();
 516   }
 517 


< prev index next >