< prev index next >

src/hotspot/share/gc/shared/space.hpp

Print this page
@@ -309,11 +309,22 @@
  
    static inline void verify_up_to_first_dead(ContiguousSpace* space) NOT_DEBUG_RETURN;
  
    static inline void clear_empty_region(ContiguousSpace* space);
  
-  protected:
+ #if INCLUDE_SERIALGC
+   template <bool ALT_FWD>
+   void prepare_for_compaction_impl(CompactPoint* cp);
+ 
+   template <bool ALT_FWD>
+   void adjust_pointers_impl();
+ 
+   template <bool ALT_FWD>
+   void compact_impl();
+ #endif
+ 
+ protected:
    HeapWord* _top;
    // A helper for mangling the unused area of the space in debug builds.
    GenSpaceMangler* _mangler;
  
    // Used during compaction.

@@ -396,11 +407,12 @@
    // be one, since compaction must succeed -- we go to the first space of
    // the previous generation if necessary, updating "cp"), reset compact_top
    // and then forward.  In either case, returns the new value of "compact_top".
    // Invokes the "alloc_block" function of the then-current compaction
    // space.
-   virtual HeapWord* forward(oop q, size_t size, CompactPoint* cp,
+   template <bool ALT_FWD>
+   HeapWord* forward(oop q, size_t size, CompactPoint* cp,
                      HeapWord* compact_top);
  
    // Accessors
    HeapWord* top() const            { return _top;    }
    void set_top(HeapWord* value)    { _top = value; }
< prev index next >