1972 _evacuation_failed_info_array = NEW_C_HEAP_ARRAY(EvacuationFailedInfo, n_queues, mtGC); 1973 1974 for (int i = 0; i < n_queues; i++) { 1975 RefToScanQueue* q = new RefToScanQueue(); 1976 q->initialize(); 1977 _task_queues->register_queue(i, q); 1978 ::new (&_evacuation_failed_info_array[i]) EvacuationFailedInfo(); 1979 } 1980 clear_cset_start_regions(); 1981 1982 // Initialize the G1EvacuationFailureALot counters and flags. 1983 NOT_PRODUCT(reset_evacuation_should_fail();) 1984 1985 guarantee(_task_queues != NULL, "task_queues allocation failure."); 1986 } 1987 1988 jint G1CollectedHeap::initialize() { 1989 CollectedHeap::pre_initialize(); 1990 os::enable_vtime(); 1991 1992 G1Log::init(); 1993 1994 // Necessary to satisfy locking discipline assertions. 1995 1996 MutexLocker x(Heap_lock); 1997 1998 // We have to initialize the printer before committing the heap, as 1999 // it will be used then. 2000 _hr_printer.set_active(G1PrintHeapRegions); 2001 2002 // While there are no constraints in the GC code that HeapWordSize 2003 // be any particular value, there are multiple other areas in the 2004 // system which believe this to be true (e.g. oop->object_size in some 2005 // cases incorrectly returns the size in wordSize units rather than 2006 // HeapWordSize). 2007 guarantee(HeapWordSize == wordSize, "HeapWordSize must equal wordSize"); 2008 2009 size_t init_byte_size = collector_policy()->initial_heap_byte_size(); 2010 size_t max_byte_size = collector_policy()->max_heap_byte_size(); 2011 2012 // Ensure that the sizes are properly aligned. 2013 Universe::check_alignment(init_byte_size, HeapRegion::GrainBytes, "g1 heap"); | 1972 _evacuation_failed_info_array = NEW_C_HEAP_ARRAY(EvacuationFailedInfo, n_queues, mtGC); 1973 1974 for (int i = 0; i < n_queues; i++) { 1975 RefToScanQueue* q = new RefToScanQueue(); 1976 q->initialize(); 1977 _task_queues->register_queue(i, q); 1978 ::new (&_evacuation_failed_info_array[i]) EvacuationFailedInfo(); 1979 } 1980 clear_cset_start_regions(); 1981 1982 // Initialize the G1EvacuationFailureALot counters and flags. 1983 NOT_PRODUCT(reset_evacuation_should_fail();) 1984 1985 guarantee(_task_queues != NULL, "task_queues allocation failure."); 1986 } 1987 1988 jint G1CollectedHeap::initialize() { 1989 CollectedHeap::pre_initialize(); 1990 os::enable_vtime(); 1991 1992 // Necessary to satisfy locking discipline assertions. 1993 1994 MutexLocker x(Heap_lock); 1995 1996 // We have to initialize the printer before committing the heap, as 1997 // it will be used then. 1998 _hr_printer.set_active(G1PrintHeapRegions); 1999 2000 // While there are no constraints in the GC code that HeapWordSize 2001 // be any particular value, there are multiple other areas in the 2002 // system which believe this to be true (e.g. oop->object_size in some 2003 // cases incorrectly returns the size in wordSize units rather than 2004 // HeapWordSize). 2005 guarantee(HeapWordSize == wordSize, "HeapWordSize must equal wordSize"); 2006 2007 size_t init_byte_size = collector_policy()->initial_heap_byte_size(); 2008 size_t max_byte_size = collector_policy()->max_heap_byte_size(); 2009 2010 // Ensure that the sizes are properly aligned. 2011 Universe::check_alignment(init_byte_size, HeapRegion::GrainBytes, "g1 heap"); |