diff options
Diffstat (limited to 'src/runtime/mgc.go')
| -rw-r--r-- | src/runtime/mgc.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/runtime/mgc.go b/src/runtime/mgc.go index 354ea22b0e..f96dbadd01 100644 --- a/src/runtime/mgc.go +++ b/src/runtime/mgc.go @@ -187,12 +187,18 @@ func gcinit() { // Use the environment variable GOMEMLIMIT for the initial memoryLimit value. gcController.init(readGOGC(), readGOMEMLIMIT()) + // Set up the cleanup block ptr mask. + for i := range cleanupBlockPtrMask { + cleanupBlockPtrMask[i] = 0xff + } + work.startSema = 1 work.markDoneSema = 1 lockInit(&work.sweepWaiters.lock, lockRankSweepWaiters) lockInit(&work.assistQueue.lock, lockRankAssistQueue) lockInit(&work.strongFromWeak.lock, lockRankStrongFromWeakQueue) lockInit(&work.wbufSpans.lock, lockRankWbufSpans) + lockInit(&gcCleanups.lock, lockRankCleanupQueue) } // gcenable is called after the bulk of the runtime initialization, |
