src/hotspot/share/gc/cms/cmsHeap.cpp
changeset 52955 f0f3dc30e3bb
parent 52876 2d17750d41e7
child 53536 482109fae02b
equal deleted inserted replaced
52954:799e964e32b6 52955:f0f3dc30e3bb
    68 CMSHeap::CMSHeap(GenCollectorPolicy *policy) :
    68 CMSHeap::CMSHeap(GenCollectorPolicy *policy) :
    69     GenCollectedHeap(policy,
    69     GenCollectedHeap(policy,
    70                      Generation::ParNew,
    70                      Generation::ParNew,
    71                      Generation::ConcurrentMarkSweep,
    71                      Generation::ConcurrentMarkSweep,
    72                      "ParNew:CMS"),
    72                      "ParNew:CMS"),
       
    73     _workers(NULL),
    73     _eden_pool(NULL),
    74     _eden_pool(NULL),
    74     _survivor_pool(NULL),
    75     _survivor_pool(NULL),
    75     _old_pool(NULL) {
    76     _old_pool(NULL) {
       
    77 }
       
    78 
       
    79 jint CMSHeap::initialize() {
       
    80   jint status = GenCollectedHeap::initialize();
       
    81   if (status != JNI_OK) return status;
       
    82 
    76   _workers = new WorkGang("GC Thread", ParallelGCThreads,
    83   _workers = new WorkGang("GC Thread", ParallelGCThreads,
    77                           /* are_GC_task_threads */true,
    84                           /* are_GC_task_threads */true,
    78                           /* are_ConcurrentGC_threads */false);
    85                           /* are_ConcurrentGC_threads */false);
       
    86   if (_workers == NULL) {
       
    87     return JNI_ENOMEM;
       
    88   }
    79   _workers->initialize_workers();
    89   _workers->initialize_workers();
    80 }
       
    81 
       
    82 jint CMSHeap::initialize() {
       
    83   jint status = GenCollectedHeap::initialize();
       
    84   if (status != JNI_OK) return status;
       
    85 
    90 
    86   // If we are running CMS, create the collector responsible
    91   // If we are running CMS, create the collector responsible
    87   // for collecting the CMS generations.
    92   // for collecting the CMS generations.
    88   if (!create_cms_collector()) {
    93   if (!create_cms_collector()) {
    89     return JNI_ENOMEM;
    94     return JNI_ENOMEM;