--- old/src/hotspot/share/gc/parallel/adjoiningGenerations.hpp 2018-09-04 22:28:42.820023400 -0700 +++ new/src/hotspot/share/gc/parallel/adjoiningGenerations.hpp 2018-09-04 22:28:42.208808300 -0700 @@ -43,27 +43,29 @@ class AdjoiningGenerations : public CHeapObj { friend class VMStructs; private: - // The young generation and old generation, respectively - PSYoungGen* _young_gen; - PSOldGen* _old_gen; - - // The spaces used by the two generations. - AdjoiningVirtualSpaces _virtual_spaces; - // Move boundary up to expand old gen. Checks are made to // determine if the move can be done with specified limits. void request_old_gen_expansion(size_t desired_change_in_bytes); // Move boundary down to expand young gen. bool request_young_gen_expansion(size_t desired_change_in_bytes); + protected: + // The young generation and old generation, respectively + PSYoungGen* _young_gen; + PSOldGen* _old_gen; + + // The spaces used by the two generations. + AdjoiningVirtualSpaces* _virtual_spaces; + public: AdjoiningGenerations(ReservedSpace rs, GenerationSizer* policy, size_t alignment); + AdjoiningGenerations(); // Accessors PSYoungGen* young_gen() { return _young_gen; } PSOldGen* old_gen() { return _old_gen; } - AdjoiningVirtualSpaces* virtual_spaces() { return &_virtual_spaces; } + AdjoiningVirtualSpaces* virtual_spaces() { return _virtual_spaces; } // Additional space is needed in the old generation. Check // the available space and attempt to move the boundary if more space @@ -74,7 +76,6 @@ // Return the total byte size of the reserved space // for the adjoining generations. - size_t reserved_byte_size(); + virtual size_t reserved_byte_size(); }; - #endif // SHARE_VM_GC_PARALLEL_ADJOININGGENERATIONS_HPP