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 space is an abstraction for the "storage units" backing
26 // up the generation abstraction. It includes specific
27 // implementations for keeping track of free and used space,
28 // for iterating over objects and free blocks, etc.
29
30 // Here's the Space hierarchy:
31 //
32 // - Space -- an asbtract base class describing a heap area
33 // - CompactibleSpace -- a space supporting compaction
34 // - CompactibleFreeListSpace -- (used for CMS generation)
35 // - ContiguousSpace -- a compactible space in which all free space
36 // is contiguous
37 // - EdenSpace -- contiguous space used as nursery
38 // - ConcEdenSpace -- contiguous space with a 'soft end safe' allocation
39 // - OffsetTableContigSpace -- contiguous space with a block offset array
40 // that allows "fast" block_start calls
41 // - TenuredSpace -- (used for TenuredGeneration)
42 // - ContigPermSpace -- an offset table contiguous space for perm gen
43
44 // Forward decls.
1090 public:
1091 // Constructor
1092 TenuredSpace(BlockOffsetSharedArray* sharedOffsetArray,
1093 MemRegion mr) :
1094 OffsetTableContigSpace(sharedOffsetArray, mr) {}
1095 };
1096
1097
1098 // Class ContigPermSpace is used by CompactingPermGen
1099
1100 class ContigPermSpace: public OffsetTableContigSpace {
1101 friend class VMStructs;
1102 protected:
1103 // Mark sweep support
1104 size_t allowed_dead_ratio() const;
1105 public:
1106 // Constructor
1107 ContigPermSpace(BlockOffsetSharedArray* sharedOffsetArray, MemRegion mr) :
1108 OffsetTableContigSpace(sharedOffsetArray, mr) {}
1109 };
|
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_SPACE_HPP
26 #define SHARE_VM_MEMORY_SPACE_HPP
27
28 #include "memory/allocation.hpp"
29 #include "memory/blockOffsetTable.hpp"
30 #include "memory/cardTableModRefBS.hpp"
31 #include "memory/iterator.hpp"
32 #include "memory/memRegion.hpp"
33 #include "memory/watermark.hpp"
34 #include "oops/markOop.hpp"
35 #include "runtime/mutexLocker.hpp"
36 #include "runtime/prefetch.hpp"
37 #include "utilities/workgroup.hpp"
38 #ifdef TARGET_OS_FAMILY_linux
39 # include "os_linux.inline.hpp"
40 #endif
41 #ifdef TARGET_OS_FAMILY_solaris
42 # include "os_solaris.inline.hpp"
43 #endif
44 #ifdef TARGET_OS_FAMILY_windows
45 # include "os_windows.inline.hpp"
46 #endif
47
48 // A space is an abstraction for the "storage units" backing
49 // up the generation abstraction. It includes specific
50 // implementations for keeping track of free and used space,
51 // for iterating over objects and free blocks, etc.
52
53 // Here's the Space hierarchy:
54 //
55 // - Space -- an asbtract base class describing a heap area
56 // - CompactibleSpace -- a space supporting compaction
57 // - CompactibleFreeListSpace -- (used for CMS generation)
58 // - ContiguousSpace -- a compactible space in which all free space
59 // is contiguous
60 // - EdenSpace -- contiguous space used as nursery
61 // - ConcEdenSpace -- contiguous space with a 'soft end safe' allocation
62 // - OffsetTableContigSpace -- contiguous space with a block offset array
63 // that allows "fast" block_start calls
64 // - TenuredSpace -- (used for TenuredGeneration)
65 // - ContigPermSpace -- an offset table contiguous space for perm gen
66
67 // Forward decls.
1113 public:
1114 // Constructor
1115 TenuredSpace(BlockOffsetSharedArray* sharedOffsetArray,
1116 MemRegion mr) :
1117 OffsetTableContigSpace(sharedOffsetArray, mr) {}
1118 };
1119
1120
1121 // Class ContigPermSpace is used by CompactingPermGen
1122
1123 class ContigPermSpace: public OffsetTableContigSpace {
1124 friend class VMStructs;
1125 protected:
1126 // Mark sweep support
1127 size_t allowed_dead_ratio() const;
1128 public:
1129 // Constructor
1130 ContigPermSpace(BlockOffsetSharedArray* sharedOffsetArray, MemRegion mr) :
1131 OffsetTableContigSpace(sharedOffsetArray, mr) {}
1132 };
1133
1134 #endif // SHARE_VM_MEMORY_SPACE_HPP
|