src/share/vm/gc_implementation/shared/spaceDecorator.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/gc_implementation/shared

src/share/vm/gc_implementation/shared/spaceDecorator.hpp

Print this page
rev 5732 : [mq]: comments2


  58 // to-space is used as scratch space for a mark-sweep-compact
  59 // collection.
  60 //   Spaces are mangled after a collection.  If the generation
  61 // grows after a collection, the added space is mangled as part of
  62 // the growth of the generation.  No additional mangling is needed when the
  63 // spaces are resized after an expansion.
  64 //   The class SpaceMangler keeps a pointer to the top of the allocated
  65 // area and provides the methods for doing the piece meal mangling.
  66 // Methods for doing sparces and full checking of the mangling are
  67 // included.  The full checking is done if DEBUG_MANGLING is defined.
  68 //   GenSpaceMangler is used with the GenCollectedHeap collectors and
  69 // MutableSpaceMangler is used with the ParallelScavengeHeap collectors.
  70 // These subclasses abstract the differences in the types of spaces used
  71 // by each heap.
  72 
  73 class SpaceMangler: public CHeapObj<mtGC> {
  74   friend class VMStructs;
  75 
  76   // High water mark for allocations.  Typically, the space above
  77   // this point have been mangle previously and don't need to be
  78   // touched again.  Space belows this point has been allocated
  79   // and remangling is needed between the current top and this
  80   // high water mark.
  81   HeapWord* _top_for_allocations;
  82   HeapWord* top_for_allocations() { return _top_for_allocations; }
  83 
  84  public:
  85 
  86   // Setting _top_for_allocations to NULL at initialization
  87   // makes it always below top so that mangling done as part
  88   // of the initialize() call of a space does nothing (as it
  89   // should since the mangling is done as part of the constructor
  90   // for the space.
  91   SpaceMangler() : _top_for_allocations(NULL) {}
  92 
  93   // Methods for top and end that delegate to the specific
  94   // space type.
  95   virtual HeapWord* top() const = 0;
  96   virtual HeapWord* end() const = 0;
  97 
  98   // Return true if q matches the mangled pattern.




  58 // to-space is used as scratch space for a mark-sweep-compact
  59 // collection.
  60 //   Spaces are mangled after a collection.  If the generation
  61 // grows after a collection, the added space is mangled as part of
  62 // the growth of the generation.  No additional mangling is needed when the
  63 // spaces are resized after an expansion.
  64 //   The class SpaceMangler keeps a pointer to the top of the allocated
  65 // area and provides the methods for doing the piece meal mangling.
  66 // Methods for doing sparces and full checking of the mangling are
  67 // included.  The full checking is done if DEBUG_MANGLING is defined.
  68 //   GenSpaceMangler is used with the GenCollectedHeap collectors and
  69 // MutableSpaceMangler is used with the ParallelScavengeHeap collectors.
  70 // These subclasses abstract the differences in the types of spaces used
  71 // by each heap.
  72 
  73 class SpaceMangler: public CHeapObj<mtGC> {
  74   friend class VMStructs;
  75 
  76   // High water mark for allocations.  Typically, the space above
  77   // this point have been mangle previously and don't need to be
  78   // touched again.  Space below this point has been allocated
  79   // and remangling is needed between the current top and this
  80   // high water mark.
  81   HeapWord* _top_for_allocations;
  82   HeapWord* top_for_allocations() { return _top_for_allocations; }
  83 
  84  public:
  85 
  86   // Setting _top_for_allocations to NULL at initialization
  87   // makes it always below top so that mangling done as part
  88   // of the initialize() call of a space does nothing (as it
  89   // should since the mangling is done as part of the constructor
  90   // for the space.
  91   SpaceMangler() : _top_for_allocations(NULL) {}
  92 
  93   // Methods for top and end that delegate to the specific
  94   // space type.
  95   virtual HeapWord* top() const = 0;
  96   virtual HeapWord* end() const = 0;
  97 
  98   // Return true if q matches the mangled pattern.


src/share/vm/gc_implementation/shared/spaceDecorator.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File