75 _workers = new WorkGang("GC Thread", ParallelGCThreads,
76 /* are_GC_task_threads */true,
77 /* are_ConcurrentGC_threads */false);
78 _workers->initialize_workers();
79 }
80
81 jint CMSHeap::initialize() {
82 jint status = GenCollectedHeap::initialize();
83 if (status != JNI_OK) return status;
84
85 // If we are running CMS, create the collector responsible
86 // for collecting the CMS generations.
87 if (!create_cms_collector()) {
88 return JNI_ENOMEM;
89 }
90
91 return JNI_OK;
92 }
93
94 CardTableRS* CMSHeap::create_rem_set(const MemRegion& reserved_region) {
95 const bool scan_concurrently = CMSPrecleaningEnabled;
96 return new CMSCardTable(reserved_region, scan_concurrently);
97 }
98
99 void CMSHeap::initialize_serviceability() {
100 _young_manager = new GCMemoryManager("ParNew", "end of minor GC");
101 _old_manager = new GCMemoryManager("ConcurrentMarkSweep", "end of major GC");
102
103 ParNewGeneration* young = (ParNewGeneration*) young_gen();
104 _eden_pool = new ContiguousSpacePool(young->eden(),
105 "Par Eden Space",
106 young->max_eden_size(),
107 false);
108
109 _survivor_pool = new SurvivorContiguousSpacePool(young,
110 "Par Survivor Space",
111 young->max_survivor_size(),
112 false);
113
114 ConcurrentMarkSweepGeneration* old = (ConcurrentMarkSweepGeneration*) old_gen();
115 _old_pool = new CompactibleFreeListSpacePool(old->cmsSpace(),
116 "CMS Old Gen",
|
75 _workers = new WorkGang("GC Thread", ParallelGCThreads,
76 /* are_GC_task_threads */true,
77 /* are_ConcurrentGC_threads */false);
78 _workers->initialize_workers();
79 }
80
81 jint CMSHeap::initialize() {
82 jint status = GenCollectedHeap::initialize();
83 if (status != JNI_OK) return status;
84
85 // If we are running CMS, create the collector responsible
86 // for collecting the CMS generations.
87 if (!create_cms_collector()) {
88 return JNI_ENOMEM;
89 }
90
91 return JNI_OK;
92 }
93
94 CardTableRS* CMSHeap::create_rem_set(const MemRegion& reserved_region) {
95 return new CMSCardTable(reserved_region);
96 }
97
98 void CMSHeap::initialize_serviceability() {
99 _young_manager = new GCMemoryManager("ParNew", "end of minor GC");
100 _old_manager = new GCMemoryManager("ConcurrentMarkSweep", "end of major GC");
101
102 ParNewGeneration* young = (ParNewGeneration*) young_gen();
103 _eden_pool = new ContiguousSpacePool(young->eden(),
104 "Par Eden Space",
105 young->max_eden_size(),
106 false);
107
108 _survivor_pool = new SurvivorContiguousSpacePool(young,
109 "Par Survivor Space",
110 young->max_survivor_size(),
111 false);
112
113 ConcurrentMarkSweepGeneration* old = (ConcurrentMarkSweepGeneration*) old_gen();
114 _old_pool = new CompactibleFreeListSpacePool(old->cmsSpace(),
115 "CMS Old Gen",
|