diff --git a/src/runtime/mcentral.go b/src/runtime/mcentral.go index bbbfb18fbf..5baaef99f8 100644 --- a/src/runtime/mcentral.go +++ b/src/runtime/mcentral.go @@ -160,7 +160,7 @@ func (c *mcentral) uncacheSpan(s *mspan) { // freeSpan returns true if s was returned to the heap. // If preserve=true, it does not move s (the caller // must take care of it). -func (c *mcentral) freeSpan(s *mspan, start gclinkptr, end gclinkptr, preserve bool, wasempty bool) bool { +func (c *mcentral) freeSpan(s *mspan, preserve bool, wasempty bool) bool { if s.incache { throw("freeSpan given cached span") } diff --git a/src/runtime/mgcsweep.go b/src/runtime/mgcsweep.go index b1d6234af4..084d0a71c1 100644 --- a/src/runtime/mgcsweep.go +++ b/src/runtime/mgcsweep.go @@ -187,8 +187,6 @@ func (s *mspan) sweep(preserve bool) bool { res := false nfree := 0 - var head, end gclinkptr - c := _g_.m.mcache freeToHeap := false @@ -292,7 +290,7 @@ func (s *mspan) sweep(preserve bool) bool { if nfree > 0 && cl != 0 { c.local_nsmallfree[cl] += uintptr(nfree) - res = mheap_.central[cl].mcentral.freeSpan(s, head, end, preserve, wasempty) + res = mheap_.central[cl].mcentral.freeSpan(s, preserve, wasempty) // MCentral_FreeSpan updates sweepgen } else if freeToHeap { // Free large span to heap