File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -1821,12 +1821,18 @@ static void major_collection_slice(intnat howmuch,
1821
1821
1822
1822
if (domain_state -> sweeping_done ) {
1823
1823
/* We do not immediately trigger a minor GC, but instead wait for
1824
- the next one to happen normally. This gives some chance that
1825
- other domains will finish sweeping as well. */
1824
+ the next one to happen normally, when marking will start. This
1825
+ gives some chance that other domains will finish sweeping as
1826
+ well. */
1826
1827
request_mark_phase ();
1828
+ /* If there was no sweeping to do, but marking hasn't started,
1829
+ then minor GC has not occurred naturally between major slices -
1830
+ so we should force one now. */
1831
+ if (sweep_work == 0 && !caml_marking_started ()) {
1832
+ caml_request_minor_gc ();
1833
+ }
1827
1834
}
1828
1835
1829
-
1830
1836
mark_again :
1831
1837
if (caml_marking_started () &&
1832
1838
!domain_state -> marking_done &&
You can’t perform that action at this time.
0 commit comments