src/share/vm/memory/sharedHeap.hpp

Print this page




   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  *
  23  */
  24 







  25 // A "SharedHeap" is an implementation of a java heap for HotSpot.  This
  26 // is an abstract class: there may be many different kinds of heaps.  This
  27 // class defines the functions that a heap must implement, and contains
  28 // infrastructure common to all heaps.
  29 
  30 class PermGen;
  31 class Generation;
  32 class BarrierSet;
  33 class GenRemSet;
  34 class Space;
  35 class SpaceClosure;
  36 class OopClosure;
  37 class OopsInGenClosure;
  38 class ObjectClosure;
  39 class SubTasksDone;
  40 class WorkGang;
  41 class FlexibleWorkGang;
  42 class CollectorPolicy;
  43 class KlassHandle;
  44 


 268     assert(perm_gen(), "NULL perm gen");
 269     return _perm_gen->mem_allocate(size);
 270   }
 271 
 272   void permanent_oop_iterate(OopClosure* cl) {
 273     assert(perm_gen(), "NULL perm gen");
 274     _perm_gen->oop_iterate(cl);
 275   }
 276 
 277   void permanent_object_iterate(ObjectClosure* cl) {
 278     assert(perm_gen(), "NULL perm gen");
 279     _perm_gen->object_iterate(cl);
 280   }
 281 
 282   // Some utilities.
 283   void print_size_transition(outputStream* out,
 284                              size_t bytes_before,
 285                              size_t bytes_after,
 286                              size_t capacity);
 287 };




   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  *
  23  */
  24 
  25 #ifndef SHARE_VM_MEMORY_SHAREDHEAP_HPP
  26 #define SHARE_VM_MEMORY_SHAREDHEAP_HPP
  27 
  28 #include "gc_interface/collectedHeap.hpp"
  29 #include "memory/generation.hpp"
  30 #include "memory/permGen.hpp"
  31 
  32 // A "SharedHeap" is an implementation of a java heap for HotSpot.  This
  33 // is an abstract class: there may be many different kinds of heaps.  This
  34 // class defines the functions that a heap must implement, and contains
  35 // infrastructure common to all heaps.
  36 
  37 class PermGen;
  38 class Generation;
  39 class BarrierSet;
  40 class GenRemSet;
  41 class Space;
  42 class SpaceClosure;
  43 class OopClosure;
  44 class OopsInGenClosure;
  45 class ObjectClosure;
  46 class SubTasksDone;
  47 class WorkGang;
  48 class FlexibleWorkGang;
  49 class CollectorPolicy;
  50 class KlassHandle;
  51 


 275     assert(perm_gen(), "NULL perm gen");
 276     return _perm_gen->mem_allocate(size);
 277   }
 278 
 279   void permanent_oop_iterate(OopClosure* cl) {
 280     assert(perm_gen(), "NULL perm gen");
 281     _perm_gen->oop_iterate(cl);
 282   }
 283 
 284   void permanent_object_iterate(ObjectClosure* cl) {
 285     assert(perm_gen(), "NULL perm gen");
 286     _perm_gen->object_iterate(cl);
 287   }
 288 
 289   // Some utilities.
 290   void print_size_transition(outputStream* out,
 291                              size_t bytes_before,
 292                              size_t bytes_after,
 293                              size_t capacity);
 294 };
 295 
 296 #endif // SHARE_VM_MEMORY_SHAREDHEAP_HPP