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 604d0db24a2..b2558c8bd3c 100644 --- a/src/runtime/mgc.go +++ b/src/runtime/mgc.go @@ -1536,6 +1536,7 @@ func gcResetMarkState() { // Hooks for other packages var poolcleanup func() +var boringCaches []unsafe.Pointer //go:linkname sync_runtime_registerPoolCleanup sync.runtime_registerPoolCleanup func sync_runtime_registerPoolCleanup(f func()) { @@ -1548,6 +1549,11 @@ func clearpools() { poolcleanup() } + // clear boringcrypto caches + for _, p := range boringCaches { + atomicstorep(p, nil) + } + // Clear central sudog cache. // Leave per-P caches alone, they have strictly bounded size. // Disconnect cached list before dropping it on the floor, |