1780
1781 _bot = new G1BlockOffsetTable(reserved_region(), bot_storage);
1782
1783 {
1784 HeapWord* start = _hrm->reserved().start();
1785 HeapWord* end = _hrm->reserved().end();
1786 size_t granularity = HeapRegion::GrainBytes;
1787
1788 _region_attr.initialize(start, end, granularity);
1789 _humongous_reclaim_candidates.initialize(start, end, granularity);
1790 }
1791
1792 _workers = new WorkGang("GC Thread", ParallelGCThreads,
1793 true /* are_GC_task_threads */,
1794 false /* are_ConcurrentGC_threads */);
1795 if (_workers == NULL) {
1796 return JNI_ENOMEM;
1797 }
1798 _workers->initialize_workers();
1799
1800 _numa->set_region_info(g1_rs.base(), HeapRegion::GrainBytes, page_size);
1801
1802 // Create the G1ConcurrentMark data structure and thread.
1803 // (Must do this late, so that "max_regions" is defined.)
1804 _cm = new G1ConcurrentMark(this, prev_bitmap_storage, next_bitmap_storage);
1805 if (_cm == NULL || !_cm->completed_initialization()) {
1806 vm_shutdown_during_initialization("Could not create/initialize G1ConcurrentMark");
1807 return JNI_ENOMEM;
1808 }
1809 _cm_thread = _cm->cm_thread();
1810
1811 // Now expand into the initial heap size.
1812 if (!expand(init_byte_size, _workers)) {
1813 vm_shutdown_during_initialization("Failed to allocate initial heap.");
1814 return JNI_ENOMEM;
1815 }
1816
1817 // Perform any initialization actions delegated to the policy.
1818 policy()->init(this, &_collection_set);
1819
1820 jint ecode = initialize_concurrent_refinement();
|
1780
1781 _bot = new G1BlockOffsetTable(reserved_region(), bot_storage);
1782
1783 {
1784 HeapWord* start = _hrm->reserved().start();
1785 HeapWord* end = _hrm->reserved().end();
1786 size_t granularity = HeapRegion::GrainBytes;
1787
1788 _region_attr.initialize(start, end, granularity);
1789 _humongous_reclaim_candidates.initialize(start, end, granularity);
1790 }
1791
1792 _workers = new WorkGang("GC Thread", ParallelGCThreads,
1793 true /* are_GC_task_threads */,
1794 false /* are_ConcurrentGC_threads */);
1795 if (_workers == NULL) {
1796 return JNI_ENOMEM;
1797 }
1798 _workers->initialize_workers();
1799
1800 _numa->set_region_info(HeapRegion::GrainBytes, page_size);
1801
1802 // Create the G1ConcurrentMark data structure and thread.
1803 // (Must do this late, so that "max_regions" is defined.)
1804 _cm = new G1ConcurrentMark(this, prev_bitmap_storage, next_bitmap_storage);
1805 if (_cm == NULL || !_cm->completed_initialization()) {
1806 vm_shutdown_during_initialization("Could not create/initialize G1ConcurrentMark");
1807 return JNI_ENOMEM;
1808 }
1809 _cm_thread = _cm->cm_thread();
1810
1811 // Now expand into the initial heap size.
1812 if (!expand(init_byte_size, _workers)) {
1813 vm_shutdown_during_initialization("Failed to allocate initial heap.");
1814 return JNI_ENOMEM;
1815 }
1816
1817 // Perform any initialization actions delegated to the policy.
1818 policy()->init(this, &_collection_set);
1819
1820 jint ecode = initialize_concurrent_refinement();
|