File tree Expand file tree Collapse file tree 4 files changed +65
-0
lines changed Expand file tree Collapse file tree 4 files changed +65
-0
lines changed Original file line number Diff line number Diff line change @@ -419,6 +419,34 @@ mono_gc_get_heap_size (void)
419
419
return GC_get_heap_size ();
420
420
}
421
421
422
+ int64_t
423
+ mono_gc_get_max_time_slice_ns ()
424
+ {
425
+ #if HAVE_BDWGC_GC
426
+ return GC_get_time_limit () * 1000000 ;
427
+ #else
428
+ return 0 ;
429
+ #endif
430
+ }
431
+
432
+ void
433
+ mono_gc_set_max_time_slice_ns (int64_t maxTimeSlice )
434
+ {
435
+ #if HAVE_BDWGC_GC
436
+ GC_set_time_limit (maxTimeSlice / 1000000 );
437
+ #endif
438
+ }
439
+
440
+ MonoBoolean
441
+ mono_gc_is_incremental ()
442
+ {
443
+ #if HAVE_BDWGC_GC
444
+ return GC_is_incremental_mode ();
445
+ #else
446
+ return FALSE;
447
+ #endif
448
+ }
449
+
422
450
gboolean
423
451
mono_gc_is_gc_thread (void )
424
452
{
Original file line number Diff line number Diff line change @@ -109,7 +109,10 @@ MONO_API int mono_gc_get_generation (MonoObject *object);
109
109
MONO_API int mono_gc_collection_count (int generation );
110
110
MONO_API int64_t mono_gc_get_used_size (void );
111
111
MONO_API int64_t mono_gc_get_heap_size (void );
112
+ MONO_API int64_t mono_gc_get_max_time_slice_ns ();
113
+ MONO_API void mono_gc_set_max_time_slice_ns (int64_t maxTimeSlice );
112
114
MONO_API MonoBoolean mono_gc_pending_finalizers (void );
115
+ MONO_API MonoBoolean mono_gc_is_incremental (void );
113
116
MONO_API void mono_gc_finalize_notify (void );
114
117
MONO_API int mono_gc_invoke_finalizers (void );
115
118
/* heap walking is only valid in the pre-stop-world event callback */
Original file line number Diff line number Diff line change @@ -91,6 +91,23 @@ mono_gc_get_heap_size (void)
91
91
return 2 * 1024 * 1024 ;
92
92
}
93
93
94
+ int64_t
95
+ mono_gc_get_max_time_slice_ns ()
96
+ {
97
+ return 0 ;
98
+ }
99
+
100
+ void
101
+ mono_gc_set_max_time_slice_ns (int64_t maxTimeSlice )
102
+ {
103
+ }
104
+
105
+ MonoBoolean
106
+ mono_gc_is_incremental ()
107
+ {
108
+ return FALSE;
109
+ }
110
+
94
111
gboolean
95
112
mono_gc_is_gc_thread (void )
96
113
{
Original file line number Diff line number Diff line change @@ -2831,6 +2831,23 @@ mono_gc_get_heap_size (void)
2831
2831
return (int64_t )sgen_gc_get_total_heap_allocation ();
2832
2832
}
2833
2833
2834
+ int64_t
2835
+ mono_gc_get_max_time_slice_ns ()
2836
+ {
2837
+ return 0 ;
2838
+ }
2839
+
2840
+ MonoBoolean
2841
+ mono_gc_is_incremental ()
2842
+ {
2843
+ return FALSE;
2844
+ }
2845
+
2846
+ void
2847
+ mono_gc_set_max_time_slice_ns (int64_t maxTimeSlice )
2848
+ {
2849
+ }
2850
+
2834
2851
MonoGCDescriptor
2835
2852
mono_gc_make_root_descr_user (MonoGCRootMarkFunc marker )
2836
2853
{
You can’t perform that action at this time.
0 commit comments