File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -230,12 +230,18 @@ mono_gc_base_init (void)
230
230
} else if (g_str_has_prefix (opt , "toggleref-test" )) {
231
231
register_test_toggleref_callback ();
232
232
continue ;
233
- } else if (g_str_has_prefix (opt , "incremental" )) {
234
- GC_enable_incremental ();
235
- #if HAVE_BDWGC_GC
236
- // value is in milliseconds
237
- GC_set_time_limit (3 );
238
- #endif
233
+ } else if (g_str_has_prefix (opt , "incremental=" )) {
234
+ size_t time_limit ;
235
+
236
+ opt = strchr (opt , '=' ) + 1 ;
237
+ if (* opt && mono_gc_parse_environment_string_extract_number (opt , & time_limit )) {
238
+ GC_enable_incremental ();
239
+ #if HAVE_BDWGC_GC
240
+ if (time_limit != 0 )
241
+ // value is in milliseconds
242
+ GC_set_time_limit (time_limit );
243
+ #endif
244
+ }
239
245
continue ;
240
246
} else {
241
247
/* Could be a parameter for sgen */
@@ -257,11 +263,7 @@ mono_gc_base_init (void)
257
263
258
264
mono_thread_info_attach ();
259
265
260
- //#ifdef HAVE_BDWGC_GC
261
- //GC_set_on_event (on_gc_notification);
262
- //#else
263
266
GC_set_on_collection_event (on_gc_notification );
264
- //#endif
265
267
GC_on_heap_resize = on_gc_heap_resize ;
266
268
267
269
gc_initialized = TRUE;
You can’t perform that action at this time.
0 commit comments