diff options
author | Michael Anthony Knyszek <mknyszek@google.com> | 2020-02-19 16:37:48 +0000 |
---|---|---|
committer | Michael Knyszek <mknyszek@google.com> | 2020-08-17 20:06:49 +0000 |
commit | e6d0bd2b8951bde6f0ac6421f20e18efc7ba0cdb (patch) | |
tree | d397b0e7634cfa48d7f55b4bb0a7535672f8a3a0 /src/runtime/mgc.go | |
parent | 260dff3ca3b06385dc298523791a2079162f546e (diff) | |
download | go-e6d0bd2b8951bde6f0ac6421f20e18efc7ba0cdb.tar.gz go-e6d0bd2b8951bde6f0ac6421f20e18efc7ba0cdb.zip |
runtime: clean up old mcentral code
This change deletes the old mcentral implementation from the code base
and the newMCentralImpl feature flag along with it.
Updates #37487.
Change-Id: Ibca8f722665f0865051f649ffe699cbdbfdcfcf2
Reviewed-on: https://go-review.googlesource.com/c/go/+/221184
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Diffstat (limited to 'src/runtime/mgc.go')
-rw-r--r-- | src/runtime/mgc.go | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/runtime/mgc.go b/src/runtime/mgc.go index c8c4a4c758..bd87144355 100644 --- a/src/runtime/mgc.go +++ b/src/runtime/mgc.go @@ -2149,21 +2149,13 @@ func gcSweep(mode gcMode) { lock(&mheap_.lock) mheap_.sweepgen += 2 mheap_.sweepdone = 0 - if !go115NewMCentralImpl && mheap_.sweepSpans[mheap_.sweepgen/2%2].index != 0 { - // We should have drained this list during the last - // sweep phase. We certainly need to start this phase - // with an empty swept list. - throw("non-empty swept list") - } mheap_.pagesSwept = 0 mheap_.sweepArenas = mheap_.allArenas mheap_.reclaimIndex = 0 mheap_.reclaimCredit = 0 unlock(&mheap_.lock) - if go115NewMCentralImpl { - sweep.centralIndex.clear() - } + sweep.centralIndex.clear() if !_ConcurrentSweep || mode == gcForceBlockMode { // Special case synchronous sweep. |