< prev index next >

src/share/vm/memory/generation.hpp

Print this page


   1 /*
   2  * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


 128   // not included.
 129   void younger_refs_in_space_iterate(Space* sp, OopsInGenClosure* cl);
 130 
 131  public:
 132   // The set of possible generation kinds.
 133   enum Name {
 134     ASParNew,
 135     ASConcurrentMarkSweep,
 136     DefNew,
 137     ParNew,
 138     MarkSweepCompact,
 139     ConcurrentMarkSweep,
 140     Other
 141   };
 142 
 143   enum SomePublicConstants {
 144     // Generations are GenGrain-aligned and have size that are multiples of
 145     // GenGrain.
 146     // Note: on ARM we add 1 bit for card_table_base to be properly aligned
 147     // (we expect its low byte to be zero - see implementation of post_barrier)
 148     LogOfGenGrain = 16 ARM_ONLY(+1),
 149     GenGrain = 1 << LogOfGenGrain
 150   };
 151 
 152   // allocate and initialize ("weak") refs processing support
 153   virtual void ref_processor_init();
 154   void set_ref_processor(ReferenceProcessor* rp) {
 155     assert(_ref_processor == NULL, "clobbering existing _ref_processor");
 156     _ref_processor = rp;
 157   }
 158 
 159   virtual Generation::Name kind() { return Generation::Other; }
 160   GenerationSpec* spec();
 161 
 162   // This properly belongs in the collector, but for now this
 163   // will do.
 164   virtual bool refs_discovery_is_atomic() const { return true;  }
 165   virtual bool refs_discovery_is_mt()     const { return false; }
 166 
 167   // Space enquiries (results in bytes)
 168   virtual size_t capacity() const = 0;  // The maximum number of object bytes the


   1 /*
   2  * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


 128   // not included.
 129   void younger_refs_in_space_iterate(Space* sp, OopsInGenClosure* cl);
 130 
 131  public:
 132   // The set of possible generation kinds.
 133   enum Name {
 134     ASParNew,
 135     ASConcurrentMarkSweep,
 136     DefNew,
 137     ParNew,
 138     MarkSweepCompact,
 139     ConcurrentMarkSweep,
 140     Other
 141   };
 142 
 143   enum SomePublicConstants {
 144     // Generations are GenGrain-aligned and have size that are multiples of
 145     // GenGrain.
 146     // Note: on ARM we add 1 bit for card_table_base to be properly aligned
 147     // (we expect its low byte to be zero - see implementation of post_barrier)
 148     LogOfGenGrain = 16 ARM32_ONLY(+1),
 149     GenGrain = 1 << LogOfGenGrain
 150   };
 151 
 152   // allocate and initialize ("weak") refs processing support
 153   virtual void ref_processor_init();
 154   void set_ref_processor(ReferenceProcessor* rp) {
 155     assert(_ref_processor == NULL, "clobbering existing _ref_processor");
 156     _ref_processor = rp;
 157   }
 158 
 159   virtual Generation::Name kind() { return Generation::Other; }
 160   GenerationSpec* spec();
 161 
 162   // This properly belongs in the collector, but for now this
 163   // will do.
 164   virtual bool refs_discovery_is_atomic() const { return true;  }
 165   virtual bool refs_discovery_is_mt()     const { return false; }
 166 
 167   // Space enquiries (results in bytes)
 168   virtual size_t capacity() const = 0;  // The maximum number of object bytes the


< prev index next >