1 /*
2 * Copyright (c) 2000, 2012, 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 *
129 size_t* _total_reserved, int* _n_covered_regions,
130 ReservedSpace* heap_rs);
131
132 // Does operations required after initialization has been done.
133 void post_initialize();
134
135 // Initialize ("weak") refs processing support
136 virtual void ref_processing_init();
137
138 virtual CollectedHeap::Name kind() const {
139 return CollectedHeap::GenCollectedHeap;
140 }
141
142 // The generational collector policy.
143 GenCollectorPolicy* gen_policy() const { return _gen_policy; }
144 virtual CollectorPolicy* collector_policy() const { return (CollectorPolicy*) gen_policy(); }
145
146 // Adaptive size policy
147 virtual AdaptiveSizePolicy* size_policy() {
148 return gen_policy()->size_policy();
149 }
150
151 size_t capacity() const;
152 size_t used() const;
153
154 // Save the "used_region" for generations level and lower.
155 void save_used_regions(int level);
156
157 size_t max_capacity() const;
158
159 HeapWord* mem_allocate(size_t size,
160 bool* gc_overhead_limit_was_exceeded);
161
162 // We may support a shared contiguous allocation area, if the youngest
163 // generation does.
164 bool supports_inline_contig_alloc() const;
165 HeapWord** top_addr() const;
166 HeapWord** end_addr() const;
167
168 // Return an estimate of the maximum allocation that could be performed
|
1 /*
2 * Copyright (c) 2000, 2013, 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 *
129 size_t* _total_reserved, int* _n_covered_regions,
130 ReservedSpace* heap_rs);
131
132 // Does operations required after initialization has been done.
133 void post_initialize();
134
135 // Initialize ("weak") refs processing support
136 virtual void ref_processing_init();
137
138 virtual CollectedHeap::Name kind() const {
139 return CollectedHeap::GenCollectedHeap;
140 }
141
142 // The generational collector policy.
143 GenCollectorPolicy* gen_policy() const { return _gen_policy; }
144 virtual CollectorPolicy* collector_policy() const { return (CollectorPolicy*) gen_policy(); }
145
146 // Adaptive size policy
147 virtual AdaptiveSizePolicy* size_policy() {
148 return gen_policy()->size_policy();
149 }
150
151 // return the (conservative) maximum heap alignment
152 static size_t max_heap_alignment() {
153 return Generation::GenGrain;
154 }
155
156 size_t capacity() const;
157 size_t used() const;
158
159 // Save the "used_region" for generations level and lower.
160 void save_used_regions(int level);
161
162 size_t max_capacity() const;
163
164 HeapWord* mem_allocate(size_t size,
165 bool* gc_overhead_limit_was_exceeded);
166
167 // We may support a shared contiguous allocation area, if the youngest
168 // generation does.
169 bool supports_inline_contig_alloc() const;
170 HeapWord** top_addr() const;
171 HeapWord** end_addr() const;
172
173 // Return an estimate of the maximum allocation that could be performed
|