src/share/vm/memory/generation.hpp

Print this page


   1 /*
   2  * Copyright (c) 1997, 2009, 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  *
  23  */
  24 













  25 // A Generation models a heap area for similarly-aged objects.
  26 // It will contain one ore more spaces holding the actual objects.
  27 //
  28 // The Generation class hierarchy:
  29 //
  30 // Generation                      - abstract base class
  31 // - DefNewGeneration              - allocation area (copy collected)
  32 //   - ParNewGeneration            - a DefNewGeneration that is collected by
  33 //                                   several threads
  34 // - CardGeneration                 - abstract class adding offset array behavior
  35 //   - OneContigSpaceCardGeneration - abstract class holding a single
  36 //                                    contiguous space with card marking
  37 //     - TenuredGeneration         - tenured (old object) space (markSweepCompact)
  38 //     - CompactingPermGenGen      - reflective object area (klasses, methods, symbols, ...)
  39 //   - ConcurrentMarkSweepGeneration - Mostly Concurrent Mark Sweep Generation
  40 //                                       (Detlefs-Printezis refinement of
  41 //                                       Boehm-Demers-Schenker)
  42 //
  43 // The system configurations currently allowed are:
  44 //


 717 
 718   inline bool block_is_obj(const HeapWord* addr) const;
 719 
 720   virtual void collect(bool full,
 721                        bool clear_all_soft_refs,
 722                        size_t size,
 723                        bool is_tlab);
 724   HeapWord* expand_and_allocate(size_t size,
 725                                 bool is_tlab,
 726                                 bool parallel = false);
 727 
 728   virtual void prepare_for_verify();
 729 
 730   virtual void gc_epilogue(bool full);
 731 
 732   virtual void record_spaces_top();
 733 
 734   virtual void verify(bool allow_dirty);
 735   virtual void print_on(outputStream* st) const;
 736 };


   1 /*
   2  * Copyright (c) 1997, 2010, 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  *
  23  */
  24 
  25 #ifndef SHARE_VM_MEMORY_GENERATION_HPP
  26 #define SHARE_VM_MEMORY_GENERATION_HPP
  27 
  28 #include "gc_implementation/shared/collectorCounters.hpp"
  29 #include "memory/allocation.hpp"
  30 #include "memory/memRegion.hpp"
  31 #include "memory/referenceProcessor.hpp"
  32 #include "memory/universe.hpp"
  33 #include "memory/watermark.hpp"
  34 #include "runtime/mutex.hpp"
  35 #include "runtime/perfData.hpp"
  36 #include "runtime/virtualspace.hpp"
  37 
  38 // A Generation models a heap area for similarly-aged objects.
  39 // It will contain one ore more spaces holding the actual objects.
  40 //
  41 // The Generation class hierarchy:
  42 //
  43 // Generation                      - abstract base class
  44 // - DefNewGeneration              - allocation area (copy collected)
  45 //   - ParNewGeneration            - a DefNewGeneration that is collected by
  46 //                                   several threads
  47 // - CardGeneration                 - abstract class adding offset array behavior
  48 //   - OneContigSpaceCardGeneration - abstract class holding a single
  49 //                                    contiguous space with card marking
  50 //     - TenuredGeneration         - tenured (old object) space (markSweepCompact)
  51 //     - CompactingPermGenGen      - reflective object area (klasses, methods, symbols, ...)
  52 //   - ConcurrentMarkSweepGeneration - Mostly Concurrent Mark Sweep Generation
  53 //                                       (Detlefs-Printezis refinement of
  54 //                                       Boehm-Demers-Schenker)
  55 //
  56 // The system configurations currently allowed are:
  57 //


 730 
 731   inline bool block_is_obj(const HeapWord* addr) const;
 732 
 733   virtual void collect(bool full,
 734                        bool clear_all_soft_refs,
 735                        size_t size,
 736                        bool is_tlab);
 737   HeapWord* expand_and_allocate(size_t size,
 738                                 bool is_tlab,
 739                                 bool parallel = false);
 740 
 741   virtual void prepare_for_verify();
 742 
 743   virtual void gc_epilogue(bool full);
 744 
 745   virtual void record_spaces_top();
 746 
 747   virtual void verify(bool allow_dirty);
 748   virtual void print_on(outputStream* st) const;
 749 };
 750 
 751 #endif // SHARE_VM_MEMORY_GENERATION_HPP