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/defNewGeneration.hpp"
27 #include "gc/serial/serialHeap.hpp"
28 #include "gc/shared/genMemoryPools.hpp"
29 #include "services/memoryManager.hpp"
30
31 SerialHeap::SerialHeap(GenCollectorPolicy* policy) :
32 GenCollectedHeap(policy,
33 Generation::DefNew,
34 Generation::MarkSweepCompact),
35 _eden_pool(NULL),
36 _survivor_pool(NULL),
37 _old_pool(NULL) {
38 _young_manager = new GCMemoryManager("Copy", "end of minor GC");
39 _old_manager = new GCMemoryManager("MarkSweepCompact", "end of major GC");
40 }
41
42 void SerialHeap::initialize_serviceability() {
43
44 DefNewGeneration* young = (DefNewGeneration*) young_gen();
45
46 // Add a memory pool for each space and young gen doesn't
47 // support low memory detection as it is expected to get filled up.
48 _eden_pool = new ContiguousSpacePool(young->eden(),
49 "Eden Space",
50 young->max_eden_size(),
51 false /* support_usage_threshold */);
52 _survivor_pool = new SurvivorContiguousSpacePool(young,
53 "Survivor Space",
54 young->max_survivor_size(),
|
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/defNewGeneration.hpp"
27 #include "gc/serial/serialHeap.hpp"
28 #include "gc/shared/genMemoryPools.hpp"
29 #include "services/memoryManager.hpp"
30
31 SerialHeap::SerialHeap(GenCollectorPolicy* policy) :
32 GenCollectedHeap(policy,
33 Generation::DefNew,
34 Generation::MarkSweepCompact,
35 "Copy:MSC"),
36 _eden_pool(NULL),
37 _survivor_pool(NULL),
38 _old_pool(NULL) {
39 _young_manager = new GCMemoryManager("Copy", "end of minor GC");
40 _old_manager = new GCMemoryManager("MarkSweepCompact", "end of major GC");
41 }
42
43 void SerialHeap::initialize_serviceability() {
44
45 DefNewGeneration* young = (DefNewGeneration*) young_gen();
46
47 // Add a memory pool for each space and young gen doesn't
48 // support low memory detection as it is expected to get filled up.
49 _eden_pool = new ContiguousSpacePool(young->eden(),
50 "Eden Space",
51 young->max_eden_size(),
52 false /* support_usage_threshold */);
53 _survivor_pool = new SurvivorContiguousSpacePool(young,
54 "Survivor Space",
55 young->max_survivor_size(),
|