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 #include "precompiled.hpp"
26 #include "gc_implementation/shared/gcTimer.hpp"
27 #include "gc_implementation/shared/gcTrace.hpp"
28 #include "gc_implementation/shared/spaceDecorator.hpp"
29 #include "gc_interface/collectedHeap.inline.hpp"
30 #include "memory/allocation.inline.hpp"
31 #include "memory/blockOffsetTable.inline.hpp"
32 #include "memory/cardTableRS.hpp"
33 #include "memory/gcLocker.inline.hpp"
34 #include "memory/genCollectedHeap.hpp"
35 #include "memory/genMarkSweep.hpp"
36 #include "memory/genOopClosures.hpp"
37 #include "memory/genOopClosures.inline.hpp"
38 #include "memory/generation.hpp"
39 #include "memory/space.inline.hpp"
40 #include "oops/oop.inline.hpp"
41 #include "runtime/java.hpp"
42 #include "utilities/copy.hpp"
43 #include "utilities/events.hpp"
44
45 Generation::Generation(ReservedSpace rs, size_t initial_size, int level) :
46 _level(level),
47 _ref_processor(NULL) {
48 if (!_virtual_space.initialize(rs, initial_size)) {
49 vm_exit_during_initialization("Could not reserve enough space for "
50 "object heap");
51 }
52 // Mangle all of the the initial generation.
53 if (ZapUnusedHeapArea) {
54 MemRegion mangle_region((HeapWord*)_virtual_space.low(),
55 (HeapWord*)_virtual_space.high());
56 SpaceMangler::mangle_region(mangle_region);
57 }
58 _reserved = MemRegion((HeapWord*)_virtual_space.low_boundary(),
59 (HeapWord*)_virtual_space.high_boundary());
|
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 #include "precompiled.hpp"
26 #include "gc/serial/genMarkSweep.hpp"
27 #include "gc/shared/blockOffsetTable.inline.hpp"
28 #include "gc/shared/cardTableRS.hpp"
29 #include "gc/shared/collectedHeap.inline.hpp"
30 #include "gc/shared/gcLocker.inline.hpp"
31 #include "gc/shared/gcTimer.hpp"
32 #include "gc/shared/gcTrace.hpp"
33 #include "gc/shared/genCollectedHeap.hpp"
34 #include "gc/shared/genOopClosures.hpp"
35 #include "gc/shared/genOopClosures.inline.hpp"
36 #include "gc/shared/generation.hpp"
37 #include "gc/shared/space.inline.hpp"
38 #include "gc/shared/spaceDecorator.hpp"
39 #include "memory/allocation.inline.hpp"
40 #include "oops/oop.inline.hpp"
41 #include "runtime/java.hpp"
42 #include "utilities/copy.hpp"
43 #include "utilities/events.hpp"
44
45 Generation::Generation(ReservedSpace rs, size_t initial_size, int level) :
46 _level(level),
47 _ref_processor(NULL) {
48 if (!_virtual_space.initialize(rs, initial_size)) {
49 vm_exit_during_initialization("Could not reserve enough space for "
50 "object heap");
51 }
52 // Mangle all of the the initial generation.
53 if (ZapUnusedHeapArea) {
54 MemRegion mangle_region((HeapWord*)_virtual_space.low(),
55 (HeapWord*)_virtual_space.high());
56 SpaceMangler::mangle_region(mangle_region);
57 }
58 _reserved = MemRegion((HeapWord*)_virtual_space.low_boundary(),
59 (HeapWord*)_virtual_space.high_boundary());
|