1968 } 1969 _cmThread = _cm->cmThread(); 1970 1971 // Now expand into the initial heap size. 1972 if (!expand(init_byte_size)) { 1973 vm_shutdown_during_initialization("Failed to allocate initial heap."); 1974 return JNI_ENOMEM; 1975 } 1976 1977 // Perform any initialization actions delegated to the policy. 1978 g1_policy()->init(); 1979 1980 JavaThread::satb_mark_queue_set().initialize(SATB_Q_CBL_mon, 1981 SATB_Q_FL_lock, 1982 G1SATBProcessCompletedThreshold, 1983 Shared_SATB_Q_lock); 1984 1985 JavaThread::dirty_card_queue_set().initialize(_refine_cte_cl, 1986 DirtyCardQ_CBL_mon, 1987 DirtyCardQ_FL_lock, 1988 concurrent_g1_refine()->yellow_zone(), 1989 concurrent_g1_refine()->red_zone(), 1990 Shared_DirtyCardQ_lock, 1991 NULL, // fl_owner 1992 true); // init_free_ids 1993 1994 dirty_card_queue_set().initialize(NULL, // Should never be called by the Java code 1995 DirtyCardQ_CBL_mon, 1996 DirtyCardQ_FL_lock, 1997 -1, // never trigger processing 1998 -1, // no limit on length 1999 Shared_DirtyCardQ_lock, 2000 &JavaThread::dirty_card_queue_set()); 2001 2002 // Here we allocate the dummy HeapRegion that is required by the 2003 // G1AllocRegion class. 2004 HeapRegion* dummy_region = _hrm.get_dummy_region(); 2005 2006 // We'll re-use the same region whether the alloc region will 2007 // require BOT updates or not and, if it doesn't, then a non-young 2008 // region will complain that it cannot support allocations without 2009 // BOT updates. So we'll tag the dummy region as eden to avoid that. | 1968 } 1969 _cmThread = _cm->cmThread(); 1970 1971 // Now expand into the initial heap size. 1972 if (!expand(init_byte_size)) { 1973 vm_shutdown_during_initialization("Failed to allocate initial heap."); 1974 return JNI_ENOMEM; 1975 } 1976 1977 // Perform any initialization actions delegated to the policy. 1978 g1_policy()->init(); 1979 1980 JavaThread::satb_mark_queue_set().initialize(SATB_Q_CBL_mon, 1981 SATB_Q_FL_lock, 1982 G1SATBProcessCompletedThreshold, 1983 Shared_SATB_Q_lock); 1984 1985 JavaThread::dirty_card_queue_set().initialize(_refine_cte_cl, 1986 DirtyCardQ_CBL_mon, 1987 DirtyCardQ_FL_lock, 1988 (int)concurrent_g1_refine()->yellow_zone(), 1989 (int)concurrent_g1_refine()->red_zone(), 1990 Shared_DirtyCardQ_lock, 1991 NULL, // fl_owner 1992 true); // init_free_ids 1993 1994 dirty_card_queue_set().initialize(NULL, // Should never be called by the Java code 1995 DirtyCardQ_CBL_mon, 1996 DirtyCardQ_FL_lock, 1997 -1, // never trigger processing 1998 -1, // no limit on length 1999 Shared_DirtyCardQ_lock, 2000 &JavaThread::dirty_card_queue_set()); 2001 2002 // Here we allocate the dummy HeapRegion that is required by the 2003 // G1AllocRegion class. 2004 HeapRegion* dummy_region = _hrm.get_dummy_region(); 2005 2006 // We'll re-use the same region whether the alloc region will 2007 // require BOT updates or not and, if it doesn't, then a non-young 2008 // region will complain that it cannot support allocations without 2009 // BOT updates. So we'll tag the dummy region as eden to avoid that. |