< prev index next > src/hotspot/share/gc/shared/space.hpp
Print this page
// the previous generation if necessary, updating "cp"), reset compact_top
// and then forward. In either case, returns the new value of "compact_top".
// If the forwarding crosses "cp->threshold", invokes the "cross_threshold"
// function of the then-current compaction space, and updates "cp->threshold
// accordingly".
! virtual HeapWord* forward(oop q, size_t size, CompactPoint* cp,
HeapWord* compact_top);
// Return a size with adjustments as required of the space.
virtual size_t adjust_object_size_v(size_t size) const { return size; }
// the previous generation if necessary, updating "cp"), reset compact_top
// and then forward. In either case, returns the new value of "compact_top".
// If the forwarding crosses "cp->threshold", invokes the "cross_threshold"
// function of the then-current compaction space, and updates "cp->threshold
// accordingly".
! template <bool ALT_FWD>
+ HeapWord* forward(oop q, size_t size, CompactPoint* cp,
HeapWord* compact_top);
// Return a size with adjustments as required of the space.
virtual size_t adjust_object_size_v(size_t size) const { return size; }
// and possibly also overriding obj_size(), and adjust_obj_size().
// These functions should avoid virtual calls whenever possible.
#if INCLUDE_SERIALGC
// Frequently calls adjust_obj_size().
! template <class SpaceType>
static inline void scan_and_adjust_pointers(SpaceType* space);
#endif
// Frequently calls obj_size().
! template <class SpaceType>
static inline void scan_and_compact(SpaceType* space);
// Frequently calls scanned_block_is_obj() and scanned_block_size().
// Requires the scan_limit() function.
! template <class SpaceType>
static inline void scan_and_forward(SpaceType* space, CompactPoint* cp);
};
class GenSpaceMangler;
// A space in which the free area is contiguous. It therefore supports
// faster allocation, and compaction.
class ContiguousSpace: public CompactibleSpace {
friend class VMStructs;
// Allow scan_and_forward function to call (private) overrides for auxiliary functions on this class
! template <typename SpaceType>
friend void CompactibleSpace::scan_and_forward(SpaceType* space, CompactPoint* cp);
private:
// Auxiliary functions for scan_and_forward support.
// See comments for CompactibleSpace for more information.
// and possibly also overriding obj_size(), and adjust_obj_size().
// These functions should avoid virtual calls whenever possible.
#if INCLUDE_SERIALGC
// Frequently calls adjust_obj_size().
! template <bool ALT_FWD, class SpaceType>
static inline void scan_and_adjust_pointers(SpaceType* space);
#endif
// Frequently calls obj_size().
! template <bool ALT_FWD, class SpaceType>
static inline void scan_and_compact(SpaceType* space);
// Frequently calls scanned_block_is_obj() and scanned_block_size().
// Requires the scan_limit() function.
! template <bool ALT_FWD, class SpaceType>
static inline void scan_and_forward(SpaceType* space, CompactPoint* cp);
};
class GenSpaceMangler;
// A space in which the free area is contiguous. It therefore supports
// faster allocation, and compaction.
class ContiguousSpace: public CompactibleSpace {
friend class VMStructs;
// Allow scan_and_forward function to call (private) overrides for auxiliary functions on this class
! template <bool ALT_FWD, typename SpaceType>
friend void CompactibleSpace::scan_and_forward(SpaceType* space, CompactPoint* cp);
private:
// Auxiliary functions for scan_and_forward support.
// See comments for CompactibleSpace for more information.
< prev index next >