< prev index next >

src/share/vm/memory/genCollectedHeap.hpp

Print this page


   1 /*
   2  * Copyright (c) 2000, 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  *


 107   // allocation request that failed in the youngest generation that should
 108   // have handled it (including collection, expansion, etc.)
 109   HeapWord* satisfy_failed_allocation(size_t size, bool is_tlab);
 110 
 111   // Callback from VM_GenCollectFull operation.
 112   // Perform a full collection of the first max_level+1 generations.
 113   virtual void do_full_collection(bool clear_all_soft_refs);
 114   void do_full_collection(bool clear_all_soft_refs, int max_level);
 115 
 116   // Does the "cause" of GC indicate that
 117   // we absolutely __must__ clear soft refs?
 118   bool must_clear_all_soft_refs();
 119 
 120 public:
 121   GenCollectedHeap(GenCollectorPolicy *policy);
 122 
 123   GCStats* gc_stats(int level) const;
 124 
 125   // Returns JNI_OK on success
 126   virtual jint initialize();
 127   char* allocate(size_t alignment, size_t* _total_reserved, ReservedSpace* heap_rs);


 128 
 129   // Does operations required after initialization has been done.
 130   void post_initialize();
 131 
 132   // Initialize ("weak") refs processing support
 133   virtual void ref_processing_init();
 134 
 135   virtual CollectedHeap::Name kind() const {
 136     return CollectedHeap::GenCollectedHeap;
 137   }
 138 
 139   // The generational collector policy.
 140   GenCollectorPolicy* gen_policy() const { return _gen_policy; }
 141   virtual CollectorPolicy* collector_policy() const { return (CollectorPolicy*) gen_policy(); }
 142 
 143   // Adaptive size policy
 144   virtual AdaptiveSizePolicy* size_policy() {
 145     return gen_policy()->size_policy();
 146   }
 147 


   1 /*
   2  * Copyright (c) 2000, 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  *


 107   // allocation request that failed in the youngest generation that should
 108   // have handled it (including collection, expansion, etc.)
 109   HeapWord* satisfy_failed_allocation(size_t size, bool is_tlab);
 110 
 111   // Callback from VM_GenCollectFull operation.
 112   // Perform a full collection of the first max_level+1 generations.
 113   virtual void do_full_collection(bool clear_all_soft_refs);
 114   void do_full_collection(bool clear_all_soft_refs, int max_level);
 115 
 116   // Does the "cause" of GC indicate that
 117   // we absolutely __must__ clear soft refs?
 118   bool must_clear_all_soft_refs();
 119 
 120 public:
 121   GenCollectedHeap(GenCollectorPolicy *policy);
 122 
 123   GCStats* gc_stats(int level) const;
 124 
 125   // Returns JNI_OK on success
 126   virtual jint initialize();
 127 
 128   // Reserve aligned space for the heap as needed by the contained generations.
 129   char* allocate(size_t alignment, ReservedSpace* heap_rs);
 130 
 131   // Does operations required after initialization has been done.
 132   void post_initialize();
 133 
 134   // Initialize ("weak") refs processing support
 135   virtual void ref_processing_init();
 136 
 137   virtual CollectedHeap::Name kind() const {
 138     return CollectedHeap::GenCollectedHeap;
 139   }
 140 
 141   // The generational collector policy.
 142   GenCollectorPolicy* gen_policy() const { return _gen_policy; }
 143   virtual CollectorPolicy* collector_policy() const { return (CollectorPolicy*) gen_policy(); }
 144 
 145   // Adaptive size policy
 146   virtual AdaptiveSizePolicy* size_policy() {
 147     return gen_policy()->size_policy();
 148   }
 149 


< prev index next >