1961 // Create the G1ConcurrentMark data structure and thread.
1962 // (Must do this late, so that "max_regions" is defined.)
1963 _cm = new G1ConcurrentMark(this, prev_bitmap_storage, next_bitmap_storage);
1964 if (_cm == NULL || !_cm->completed_initialization()) {
1965 vm_shutdown_during_initialization("Could not create/initialize G1ConcurrentMark");
1966 return JNI_ENOMEM;
1967 }
1968 _cmThread = _cm->cmThread();
1969
1970 // Now expand into the initial heap size.
1971 if (!expand(init_byte_size)) {
1972 vm_shutdown_during_initialization("Failed to allocate initial heap.");
1973 return JNI_ENOMEM;
1974 }
1975
1976 // Perform any initialization actions delegated to the policy.
1977 g1_policy()->init();
1978
1979 JavaThread::satb_mark_queue_set().initialize(SATB_Q_CBL_mon,
1980 SATB_Q_FL_lock,
1981 G1SATBProcessCompletedThreshold,
1982 Shared_SATB_Q_lock);
1983
1984 JavaThread::dirty_card_queue_set().initialize(_refine_cte_cl,
1985 DirtyCardQ_CBL_mon,
1986 DirtyCardQ_FL_lock,
1987 (int)concurrent_g1_refine()->yellow_zone(),
1988 (int)concurrent_g1_refine()->red_zone(),
1989 Shared_DirtyCardQ_lock,
1990 NULL, // fl_owner
1991 true); // init_free_ids
1992
1993 dirty_card_queue_set().initialize(NULL, // Should never be called by the Java code
1994 DirtyCardQ_CBL_mon,
1995 DirtyCardQ_FL_lock,
1996 -1, // never trigger processing
1997 -1, // no limit on length
1998 Shared_DirtyCardQ_lock,
1999 &JavaThread::dirty_card_queue_set());
2000
2001 // Here we allocate the dummy HeapRegion that is required by the
|
1961 // Create the G1ConcurrentMark data structure and thread.
1962 // (Must do this late, so that "max_regions" is defined.)
1963 _cm = new G1ConcurrentMark(this, prev_bitmap_storage, next_bitmap_storage);
1964 if (_cm == NULL || !_cm->completed_initialization()) {
1965 vm_shutdown_during_initialization("Could not create/initialize G1ConcurrentMark");
1966 return JNI_ENOMEM;
1967 }
1968 _cmThread = _cm->cmThread();
1969
1970 // Now expand into the initial heap size.
1971 if (!expand(init_byte_size)) {
1972 vm_shutdown_during_initialization("Failed to allocate initial heap.");
1973 return JNI_ENOMEM;
1974 }
1975
1976 // Perform any initialization actions delegated to the policy.
1977 g1_policy()->init();
1978
1979 JavaThread::satb_mark_queue_set().initialize(SATB_Q_CBL_mon,
1980 SATB_Q_FL_lock,
1981 SATBProcessCompletedThreshold,
1982 Shared_SATB_Q_lock);
1983
1984 JavaThread::dirty_card_queue_set().initialize(_refine_cte_cl,
1985 DirtyCardQ_CBL_mon,
1986 DirtyCardQ_FL_lock,
1987 (int)concurrent_g1_refine()->yellow_zone(),
1988 (int)concurrent_g1_refine()->red_zone(),
1989 Shared_DirtyCardQ_lock,
1990 NULL, // fl_owner
1991 true); // init_free_ids
1992
1993 dirty_card_queue_set().initialize(NULL, // Should never be called by the Java code
1994 DirtyCardQ_CBL_mon,
1995 DirtyCardQ_FL_lock,
1996 -1, // never trigger processing
1997 -1, // no limit on length
1998 Shared_DirtyCardQ_lock,
1999 &JavaThread::dirty_card_queue_set());
2000
2001 // Here we allocate the dummy HeapRegion that is required by the
|