]> Cypherpunks repositories - gostls13.git/commit
runtime: simplify mSpan_Sweep
authorAustin Clements <austin@google.com>
Tue, 21 Jul 2015 15:31:44 +0000 (11:31 -0400)
committerAustin Clements <austin@google.com>
Mon, 14 Sep 2015 18:29:58 +0000 (18:29 +0000)
commit70462f90ec6cf4c0a98f9c556f71b9c99aea94c0
treeed55cdfa4cbf7a931b9140042df55fdbb74466c8
parent572f08a06449093693fb6d09fc3c2525e5d6afbd
runtime: simplify mSpan_Sweep

This is a cleanup following cc8f544, which was a minimal change to fix
issue #11617. This consolidates the two places in mSpan_Sweep that
update sweepgen. Previously this was necessary because sweepgen must
be updated before freeing the span, but we freed large spans early.
Now we free large spans later, so there's no need to duplicate the
sweepgen update. This also means large spans can take advantage of the
sweepgen sanity checking performed for other spans.

Change-Id: I23b79dbd9ec81d08575cd307cdc0fa6b20831768
Reviewed-on: https://go-review.googlesource.com/12451
Reviewed-by: Rick Hudson <rlh@golang.org>
src/runtime/mgcsweep.go