diff --git a/src/hotspot/share/gc/g1/g1CollectedHeap.cpp b/src/hotspot/share/gc/g1/g1CollectedHeap.cpp index 2f08c359b23..ca55da6383e 100644 --- a/src/hotspot/share/gc/g1/g1CollectedHeap.cpp +++ b/src/hotspot/share/gc/g1/g1CollectedHeap.cpp @@ -1799,8 +1799,8 @@ jint G1CollectedHeap::initialize() { // Create the G1ConcurrentMark data structure and thread. // (Must do this late, so that "max_regions" is defined.) _cm = new G1ConcurrentMark(this, prev_bitmap_storage, next_bitmap_storage); - if (_cm == NULL || !_cm->completed_initialization()) { - vm_shutdown_during_initialization("Could not create/initialize G1ConcurrentMark"); + if (!_cm->completed_initialization()) { + vm_shutdown_during_initialization("Could not initialize G1ConcurrentMark"); return JNI_ENOMEM; } _cm_thread = _cm->cm_thread(); diff --git a/src/hotspot/share/gc/g1/g1ConcurrentRefine.cpp b/src/hotspot/share/gc/g1/g1ConcurrentRefine.cpp index 7a8563f4576..3cf1907fd5a 100644 --- a/src/hotspot/share/gc/g1/g1ConcurrentRefine.cpp +++ b/src/hotspot/share/gc/g1/g1ConcurrentRefine.cpp @@ -72,11 +72,7 @@ jint G1ConcurrentRefineThreadControl::initialize(G1ConcurrentRefine* cr, uint nu _cr = cr; _num_max_threads = num_max_threads; - _threads = NEW_C_HEAP_ARRAY_RETURN_NULL(G1ConcurrentRefineThread*, num_max_threads, mtGC); - if (_threads == NULL) { - vm_shutdown_during_initialization("Could not allocate thread holder array."); - return JNI_ENOMEM; - } + _threads = NEW_C_HEAP_ARRAY(G1ConcurrentRefineThread*, num_max_threads, mtGC); for (uint i = 0; i < num_max_threads; i++) { if (UseDynamicNumberOfGCThreads && i != 0 /* Always start first thread. */) { @@ -303,13 +299,6 @@ G1ConcurrentRefine* G1ConcurrentRefine::create(jint* ecode) { yellow_zone, red_zone, min_yellow_zone_size); - - if (cr == NULL) { - *ecode = JNI_ENOMEM; - vm_shutdown_during_initialization("Could not create G1ConcurrentRefine"); - return NULL; - } - *ecode = cr->initialize(); return cr; } diff --git a/src/hotspot/share/gc/g1/heapRegionRemSet.cpp b/src/hotspot/share/gc/g1/heapRegionRemSet.cpp index ef0a31b8d3c..b7babde2c49 100644 --- a/src/hotspot/share/gc/g1/heapRegionRemSet.cpp +++ b/src/hotspot/share/gc/g1/heapRegionRemSet.cpp @@ -92,14 +92,7 @@ OtherRegionsTable::OtherRegionsTable(Mutex* m) : _fine_eviction_stride = _max_fine_entries / _fine_eviction_sample_size; } - _fine_grain_regions = NEW_C_HEAP_ARRAY3(PerRegionTablePtr, _max_fine_entries, - mtGC, CURRENT_PC, AllocFailStrategy::RETURN_NULL); - - if (_fine_grain_regions == NULL) { - vm_exit_out_of_memory(sizeof(void*)*_max_fine_entries, OOM_MALLOC_ERROR, - "Failed to allocate _fine_grain_entries."); - } - + _fine_grain_regions = NEW_C_HEAP_ARRAY(PerRegionTablePtr, _max_fine_entries, mtGC); for (size_t i = 0; i < _max_fine_entries; i++) { _fine_grain_regions[i] = NULL; } diff --git a/src/hotspot/share/gc/parallel/asPSYoungGen.cpp b/src/hotspot/share/gc/parallel/asPSYoungGen.cpp index 30e7580e09a..279c93efd48 100644 --- a/src/hotspot/share/gc/parallel/asPSYoungGen.cpp +++ b/src/hotspot/share/gc/parallel/asPSYoungGen.cpp @@ -60,8 +60,7 @@ void ASPSYoungGen::initialize_virtual_space(ReservedSpace rs, assert(_init_gen_size != 0, "Should have a finite size"); _virtual_space = new PSVirtualSpaceHighToLow(rs, alignment); if (!_virtual_space->expand_by(_init_gen_size)) { - vm_exit_during_initialization("Could not reserve enough space for " - "object heap"); + vm_exit_during_initialization("Could not reserve enough space for object heap"); } } diff --git a/src/hotspot/share/gc/parallel/psCompactionManager.cpp b/src/hotspot/share/gc/parallel/psCompactionManager.cpp index 7eb9a51fecc..f5cf79916d5 100644 --- a/src/hotspot/share/gc/parallel/psCompactionManager.cpp +++ b/src/hotspot/share/gc/parallel/psCompactionManager.cpp @@ -78,16 +78,12 @@ void ParCompactionManager::initialize(ParMarkBitMap* mbm) { _manager_array = NEW_C_HEAP_ARRAY(ParCompactionManager*, parallel_gc_threads+1, mtGC); _oop_task_queues = new OopTaskQueueSet(parallel_gc_threads); - guarantee(_oop_task_queues != NULL, "Could not allocate oop task queues"); _objarray_task_queues = new ObjArrayTaskQueueSet(parallel_gc_threads); - guarantee(_objarray_task_queues != NULL, "Could not allocate objarray task queues"); _region_task_queues = new RegionTaskQueueSet(parallel_gc_threads); - guarantee(_region_task_queues != NULL, "Could not allocate region task queues"); // Create and register the ParCompactionManager(s) for the worker threads. for(uint i=0; iregister_queue(i, _manager_array[i]->marking_stack()); _objarray_task_queues->register_queue(i, &_manager_array[i]->_objarray_stack); region_task_queues()->register_queue(i, _manager_array[i]->region_stack()); @@ -96,8 +92,6 @@ void ParCompactionManager::initialize(ParMarkBitMap* mbm) { // The VMThread gets its own ParCompactionManager, which is not available // for work stealing. _manager_array[parallel_gc_threads] = new ParCompactionManager(); - guarantee(_manager_array[parallel_gc_threads] != NULL, - "Could not create ParCompactionManager"); assert(ParallelScavengeHeap::heap()->workers().total_workers() != 0, "Not initialized?"); diff --git a/src/hotspot/share/gc/parallel/psOldGen.cpp b/src/hotspot/share/gc/parallel/psOldGen.cpp index faa7d90c7d4..e5998186576 100644 --- a/src/hotspot/share/gc/parallel/psOldGen.cpp +++ b/src/hotspot/share/gc/parallel/psOldGen.cpp @@ -135,10 +135,6 @@ void PSOldGen::initialize_work(const char* perf_data_name, int level) { // _object_space = new MutableSpace(virtual_space()->alignment()); - - if (_object_space == NULL) - vm_exit_during_initialization("Could not allocate an old gen space"); - object_space()->initialize(cmr, SpaceDecorator::Clear, SpaceDecorator::Mangle); diff --git a/src/hotspot/share/gc/parallel/psPromotionManager.cpp b/src/hotspot/share/gc/parallel/psPromotionManager.cpp index 65af61505c0..9729998b940 100644 --- a/src/hotspot/share/gc/parallel/psPromotionManager.cpp +++ b/src/hotspot/share/gc/parallel/psPromotionManager.cpp @@ -60,10 +60,8 @@ void PSPromotionManager::initialize() { // and make sure that the first instance starts at a cache line. assert(_manager_array == NULL, "Attempt to initialize twice"); _manager_array = PaddedArray::create_unfreeable(promotion_manager_num); - guarantee(_manager_array != NULL, "Could not initialize promotion manager"); _stack_array_depth = new OopStarTaskQueueSet(ParallelGCThreads); - guarantee(_stack_array_depth != NULL, "Could not initialize promotion manager"); // Create and register the PSPromotionManager(s) for the worker threads. for(uint i=0; iinit(promotion_manager_num); for (uint i = 0; i < promotion_manager_num; i += 1) { _manager_array[i].register_preserved_marks(_preserved_marks_set->get(i)); diff --git a/src/hotspot/share/gc/parallel/psYoungGen.cpp b/src/hotspot/share/gc/parallel/psYoungGen.cpp index e98db1c0712..b6d252629f6 100644 --- a/src/hotspot/share/gc/parallel/psYoungGen.cpp +++ b/src/hotspot/share/gc/parallel/psYoungGen.cpp @@ -88,10 +88,6 @@ void PSYoungGen::initialize_work() { _from_space = new MutableSpace(virtual_space()->alignment()); _to_space = new MutableSpace(virtual_space()->alignment()); - if (_eden_space == NULL || _from_space == NULL || _to_space == NULL) { - vm_exit_during_initialization("Could not allocate a young gen space"); - } - // Generation Counters - generation 0, 3 subspaces _gen_counters = new PSGenerationCounters("new", 0, 3, _min_gen_size, _max_gen_size, _virtual_space); diff --git a/src/hotspot/share/gc/serial/defNewGeneration.cpp b/src/hotspot/share/gc/serial/defNewGeneration.cpp index d4429d6ebcc..06bb7c21971 100644 --- a/src/hotspot/share/gc/serial/defNewGeneration.cpp +++ b/src/hotspot/share/gc/serial/defNewGeneration.cpp @@ -168,10 +168,6 @@ DefNewGeneration::DefNewGeneration(ReservedSpace rs, _from_space = new ContiguousSpace(); _to_space = new ContiguousSpace(); - if (_eden_space == NULL || _from_space == NULL || _to_space == NULL) { - vm_exit_during_initialization("Could not allocate a new gen space"); - } - // Compute the maximum eden and survivor space sizes. These sizes // are computed assuming the entire reserved space is committed. // These values are exported as performance counters. diff --git a/src/hotspot/share/gc/shared/cardGeneration.cpp b/src/hotspot/share/gc/shared/cardGeneration.cpp index fac2fe92279..361770fcdfd 100644 --- a/src/hotspot/share/gc/shared/cardGeneration.cpp +++ b/src/hotspot/share/gc/shared/cardGeneration.cpp @@ -53,9 +53,6 @@ CardGeneration::CardGeneration(ReservedSpace rs, heap_word_size(initial_byte_size)); MemRegion committed_mr(start, heap_word_size(initial_byte_size)); _rs->resize_covered_region(committed_mr); - if (_bts == NULL) { - vm_exit_during_initialization("Could not allocate a BlockOffsetArray"); - } // Verify that the start and end of this generation is the start of a card. // If this wasn't true, a single card could span more than on generation, diff --git a/src/hotspot/share/gc/shared/cardTable.cpp b/src/hotspot/share/gc/shared/cardTable.cpp index f1061ea1093..28d20d4e29e 100644 --- a/src/hotspot/share/gc/shared/cardTable.cpp +++ b/src/hotspot/share/gc/shared/cardTable.cpp @@ -60,7 +60,7 @@ CardTable::CardTable(MemRegion whole_heap, bool conc_scan) : assert(card_size <= 512, "card_size must be less than 512"); // why? - _covered = new MemRegion[_max_covered_regions]; + _covered = new MemRegion[_max_covered_regions]; if (_covered == NULL) { vm_exit_during_initialization("Could not allocate card table covered region set."); } diff --git a/src/hotspot/share/gc/shared/cardTableRS.cpp b/src/hotspot/share/gc/shared/cardTableRS.cpp index 285fd662cef..2b16a8b70e9 100644 --- a/src/hotspot/share/gc/shared/cardTableRS.cpp +++ b/src/hotspot/share/gc/shared/cardTableRS.cpp @@ -579,11 +579,7 @@ CardTableRS::CardTableRS(MemRegion whole_heap, bool scanned_concurrently) : // max_gens is really GenCollectedHeap::heap()->gen_policy()->number_of_generations() // (which is always 2, young & old), but GenCollectedHeap has not been initialized yet. uint max_gens = 2; - _last_cur_val_in_gen = NEW_C_HEAP_ARRAY3(CardValue, max_gens + 1, - mtGC, CURRENT_PC, AllocFailStrategy::RETURN_NULL); - if (_last_cur_val_in_gen == NULL) { - vm_exit_during_initialization("Could not create last_cur_val_in_gen array."); - } + _last_cur_val_in_gen = NEW_C_HEAP_ARRAY(CardValue, max_gens + 1, mtGC); for (uint i = 0; i < max_gens + 1; i++) { _last_cur_val_in_gen[i] = clean_card_val(); } diff --git a/src/hotspot/share/gc/shared/generation.cpp b/src/hotspot/share/gc/shared/generation.cpp index 492bd823d4e..9bbe80f258f 100644 --- a/src/hotspot/share/gc/shared/generation.cpp +++ b/src/hotspot/share/gc/shared/generation.cpp @@ -79,9 +79,6 @@ void Generation::ref_processor_init() { assert(!_reserved.is_empty(), "empty generation?"); _span_based_discoverer.set_span(_reserved); _ref_processor = new ReferenceProcessor(&_span_based_discoverer); // a vanilla reference processor - if (_ref_processor == NULL) { - vm_exit_during_initialization("Could not allocate ReferenceProcessor object"); - } } void Generation::print() const { print_on(tty); } diff --git a/src/hotspot/share/gc/shared/referenceProcessor.cpp b/src/hotspot/share/gc/shared/referenceProcessor.cpp index 07c25b30f6b..4dde12e4f8d 100644 --- a/src/hotspot/share/gc/shared/referenceProcessor.cpp +++ b/src/hotspot/share/gc/shared/referenceProcessor.cpp @@ -64,9 +64,6 @@ void ReferenceProcessor::init_statics() { } else { _default_soft_ref_policy = new LRUCurrentHeapPolicy(); } - if (_always_clear_soft_ref_policy == NULL || _default_soft_ref_policy == NULL) { - vm_exit_during_initialization("Could not allocate reference policy object"); - } guarantee(RefDiscoveryPolicy == ReferenceBasedDiscovery || RefDiscoveryPolicy == ReferentBasedDiscovery, "Unrecognized RefDiscoveryPolicy");