File tree Expand file tree Collapse file tree 4 files changed +36
-0
lines changed Expand file tree Collapse file tree 4 files changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -419,6 +419,18 @@ mono_gc_get_heap_size (void)
419
419
return GC_get_heap_size ();
420
420
}
421
421
422
+ int64_t
423
+ mono_get_max_time_slice_ns ()
424
+ {
425
+ return GC_get_time_limit () * 1000000 ;
426
+ }
427
+
428
+ void
429
+ mono_set_max_time_slice_ns (int64_t maxTimeSlice )
430
+ {
431
+ GC_set_time_limit (maxTimeSlice / 1000000 );
432
+ }
433
+
422
434
gboolean
423
435
mono_gc_is_gc_thread (void )
424
436
{
Original file line number Diff line number Diff line change @@ -109,6 +109,8 @@ 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_get_max_time_slice_ns ();
113
+ MONO_API void mono_set_max_time_slice_ns (int64_t maxTimeSlice );
112
114
MONO_API MonoBoolean mono_gc_pending_finalizers (void );
113
115
MONO_API void mono_gc_finalize_notify (void );
114
116
MONO_API int mono_gc_invoke_finalizers (void );
Original file line number Diff line number Diff line change @@ -91,6 +91,17 @@ mono_gc_get_heap_size (void)
91
91
return 2 * 1024 * 1024 ;
92
92
}
93
93
94
+ int64_t
95
+ mono_get_max_time_slice_ns ()
96
+ {
97
+ return 0 ;
98
+ }
99
+
100
+ void
101
+ mono_set_max_time_slice_ns (int64_t maxTimeSlice )
102
+ {
103
+ }
104
+
94
105
gboolean
95
106
mono_gc_is_gc_thread (void )
96
107
{
Original file line number Diff line number Diff line change @@ -2831,6 +2831,17 @@ 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_get_max_time_slice_ns ()
2836
+ {
2837
+ return 0 ;
2838
+ }
2839
+
2840
+ void
2841
+ mono_set_max_time_slice_ns (int64_t maxTimeSlice )
2842
+ {
2843
+ }
2844
+
2834
2845
MonoGCDescriptor
2835
2846
mono_gc_make_root_descr_user (MonoGCRootMarkFunc marker )
2836
2847
{
You can’t perform that action at this time.
0 commit comments