< prev index next >

src/hotspot/share/gc/parallel/adjoiningGenerations.hpp

Print this page
rev 52004 : webrev.02

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.

@@ -41,40 +41,41 @@
 // is called for in this class.
 
 class AdjoiningGenerations : public CHeapObj<mtGC> {
   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
   // is needed.  The growth is not guaranteed to occur.
   void adjust_boundary_for_old_gen_needs(size_t desired_change_in_bytes);
   // Similarly for a growth of the young generation.
   void adjust_boundary_for_young_gen_needs(size_t eden_size, size_t survivor_size);
 
   // 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
< prev index next >