|
11 | 11 | typedef struct _LivenessState LivenessState; |
12 | 12 |
|
13 | 13 | #define k_block_size (8 * 1024) |
14 | | -#define k_array_elements_per_block ((k_block_size - 2 * sizeof (guint) - sizeof (gpointer)) / sizeof (gpointer)) |
| 14 | +#define k_array_elements_per_block ((k_block_size - 3 * sizeof (void*)) / sizeof (gpointer)) |
15 | 15 |
|
16 | 16 | typedef struct _custom_array_block custom_array_block; |
17 | 17 |
|
@@ -146,27 +146,6 @@ void block_array_destroy(custom_growable_block_array *block_array, LivenessState |
146 | 146 | g_free(block_array); |
147 | 147 | } |
148 | 148 |
|
149 | | -#if defined(HAVE_SGEN_GC) |
150 | | -void sgen_stop_world(int generation); |
151 | | -void sgen_restart_world(int generation); |
152 | | -#elif defined(HAVE_BOEHM_GC) |
153 | | -#ifdef HAVE_BDWGC_GC |
154 | | -extern void GC_stop_world_external(); |
155 | | -extern void GC_start_world_external(); |
156 | | -#else |
157 | | -void GC_stop_world_external() |
158 | | -{ |
159 | | - g_assert_not_reached(); |
160 | | -} |
161 | | -void GC_start_world_external() |
162 | | -{ |
163 | | - g_assert_not_reached(); |
164 | | -} |
165 | | -#endif |
166 | | -#else |
167 | | -#error need to implement liveness GC API |
168 | | -#endif |
169 | | - |
170 | 149 | /* number of sub elements of an array to process before recursing |
171 | 150 | * we take a depth first approach to use stack space rather than re-allocating |
172 | 151 | * processing array which requires restarting world to ensure allocator lock is not held |
@@ -556,25 +535,3 @@ void mono_unity_liveness_free_struct(LivenessState *state) |
556 | 535 | block_array_destroy(state->process_array, state); |
557 | 536 | g_free(state); |
558 | 537 | } |
559 | | - |
560 | | -void mono_unity_liveness_stop_gc_world() |
561 | | -{ |
562 | | -#if defined(HAVE_SGEN_GC) |
563 | | - sgen_stop_world(1); |
564 | | -#elif defined(HAVE_BOEHM_GC) |
565 | | - GC_stop_world_external(); |
566 | | -#else |
567 | | -#error need to implement liveness GC API |
568 | | -#endif |
569 | | -} |
570 | | - |
571 | | -void mono_unity_liveness_start_gc_world() |
572 | | -{ |
573 | | -#if defined(HAVE_SGEN_GC) |
574 | | - sgen_restart_world(1); |
575 | | -#elif defined(HAVE_BOEHM_GC) |
576 | | - GC_start_world_external(); |
577 | | -#else |
578 | | -#error need to implement liveness GC API |
579 | | -#endif |
580 | | -} |
0 commit comments