--- old/src/hotspot/share/gc/parallel/adjoiningVirtualSpaces.hpp 2018-09-04 22:28:47.869355200 -0700 +++ new/src/hotspot/share/gc/parallel/adjoiningVirtualSpaces.hpp 2018-09-04 22:28:47.283652600 -0700 @@ -59,14 +59,11 @@ // moved up consistently. AdjoiningVirtualSpaces provide the // interfaces for moving the this boundary. -class AdjoiningVirtualSpaces { +class AdjoiningVirtualSpaces : public CHeapObj { // space at the high end and the low end, respectively PSVirtualSpace* _high; PSVirtualSpace* _low; - // The reserved space spanned by the two spaces. - ReservedSpace _reserved_space; - // The minimum byte size for the low space. It will not // be shrunk below this value. size_t _min_low_byte_size; @@ -75,6 +72,10 @@ const size_t _alignment; + protected: + // The reserved space spanned by the two spaces. + ReservedSpace _reserved_space; + public: // Allocates two virtual spaces that will be located at the // high and low ends. Does no initialization. @@ -84,17 +85,17 @@ size_t alignment); // accessors - PSVirtualSpace* high() { return _high; } - PSVirtualSpace* low() { return _low; } + virtual PSVirtualSpace* high() { return _high; } + virtual PSVirtualSpace* low() { return _low; } ReservedSpace reserved_space() { return _reserved_space; } size_t min_low_byte_size() { return _min_low_byte_size; } size_t min_high_byte_size() { return _min_high_byte_size; } size_t alignment() const { return _alignment; } // move boundary between the two spaces up - bool adjust_boundary_up(size_t size_in_bytes); + virtual bool adjust_boundary_up(size_t size_in_bytes); // and down - bool adjust_boundary_down(size_t size_in_bytes); + virtual bool adjust_boundary_down(size_t size_in_bytes); // Maximum byte size for the high space. size_t high_byte_size_limit() { @@ -111,5 +112,4 @@ size_t init_low_byte_size, size_t init_high_byte_size); }; - #endif // SHARE_VM_GC_PARALLEL_ADJOININGVIRTUALSPACES_HPP