File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -139,8 +139,11 @@ void caml_set_minor_heap_size (asize_t wsize)
139
139
140
140
if (domain_state -> young_ptr != domain_state -> young_end ) {
141
141
CAML_EV_COUNTER (EV_C_FORCE_MINOR_SET_MINOR_HEAP_SIZE , 1 );
142
- caml_minor_collection ();
142
+ // Don't call caml_minor_collection, since that can run the
143
+ // caml_domain_external_interrupt_hook, which can allocate.
144
+ caml_empty_minor_heaps_once ();
143
145
}
146
+ CAMLassert (domain_state -> young_ptr == domain_state -> young_end );
144
147
145
148
if (caml_reallocate_minor_heap (wsize ) < 0 ) {
146
149
caml_fatal_error ("Fatal error: No memory for minor heap" );
@@ -759,7 +762,10 @@ caml_stw_empty_minor_heap_no_major_slice(caml_domain_state* domain,
759
762
#endif
760
763
761
764
CAML_EV_END (EV_MINOR_CLEAR );
765
+
762
766
caml_gc_log ("finished stw empty_minor_heap" );
767
+ CAMLassert (domain -> young_ptr == domain -> young_end );
768
+
763
769
Caml_state -> in_minor_collection = 0 ;
764
770
}
765
771
You can’t perform that action at this time.
0 commit comments