File tree 1 file changed +8
-9
lines changed 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -616,24 +616,23 @@ func gc(start_time int64, eagersweep bool) {
616
616
sweep .npausesweep = 0
617
617
}
618
618
619
- // See the comment in the beginning of this function as to why we need the following.
620
- // Even if this is still stop-the-world, a concurrent exitsyscall can allocate a stack from heap.
621
- lock (& mheap_ .lock )
622
- // Free the old cached mark array if necessary.
623
- if work .spans != nil && & work .spans [0 ] != & h_allspans [0 ] {
624
- sysFree (unsafe .Pointer (& work .spans [0 ]), uintptr (len (work .spans ))* unsafe .Sizeof (work .spans [0 ]), & memstats .other_sys )
625
- }
626
-
627
619
if debug .gccheckmark > 0 {
628
620
if ! checkmarkphase {
629
621
// first half of two-pass; don't set up sweep
630
- unlock (& mheap_ .lock )
631
622
return
632
623
}
633
624
checkmarkphase = false // done checking marks
634
625
clearCheckmarks ()
635
626
}
636
627
628
+ // See the comment in the beginning of this function as to why we need the following.
629
+ // Even if this is still stop-the-world, a concurrent exitsyscall can allocate a stack from heap.
630
+ lock (& mheap_ .lock )
631
+ // Free the old cached mark array if necessary.
632
+ if work .spans != nil && & work .spans [0 ] != & h_allspans [0 ] {
633
+ sysFree (unsafe .Pointer (& work .spans [0 ]), uintptr (len (work .spans ))* unsafe .Sizeof (work .spans [0 ]), & memstats .other_sys )
634
+ }
635
+
637
636
// Cache the current array for sweeping.
638
637
mheap_ .gcspans = mheap_ .allspans
639
638
mheap_ .sweepgen += 2
You can’t perform that action at this time.
0 commit comments