< prev index next >

src/share/vm/memory/collectorPolicy.hpp

Print this page
rev 7974 : imported patch genspecs

@@ -206,11 +206,12 @@
     }
   }
 };
 
 class GenCollectorPolicy : public CollectorPolicy {
-friend class TestGenCollectorPolicy;
+  friend class TestGenCollectorPolicy;
+  friend class VMStructs;
  protected:
   size_t _min_young_size;
   size_t _initial_young_size;
   size_t _max_young_size;
   size_t _min_old_size;

@@ -219,11 +220,12 @@
 
   // _gen_alignment and _space_alignment will have the same value most of the
   // time. When using large pages they can differ.
   size_t _gen_alignment;
 
-  GenerationSpec **_generations;
+  GenerationSpec* _young_gen_spec;
+  GenerationSpec* _old_gen_spec;
 
   // Return true if an allocation should be attempted in the older generation
   // if it fails in the younger generation.  Return false, otherwise.
   virtual bool should_try_older_generation_allocation(size_t word_size) const;
 

@@ -259,13 +261,18 @@
   size_t initial_old_size()   { return _initial_old_size; }
   size_t max_old_size()       { return _max_old_size; }
 
   int number_of_generations() { return 2; }
 
-  virtual GenerationSpec **generations() {
-    assert(_generations != NULL, "Sanity check");
-    return _generations;
+  virtual GenerationSpec* young_gen_spec() const {
+    assert(_young_gen_spec != NULL, "_young_gen_spec should have been initialized");
+    return _young_gen_spec;
+  }
+
+  virtual GenerationSpec* old_gen_spec() const {
+    assert(_old_gen_spec != NULL, "_old_gen_spec should have been initialized");
+    return _old_gen_spec;
   }
 
   virtual GenCollectorPolicy* as_generation_policy() { return this; }
 
   virtual void initialize_generations() { };
< prev index next >