1
0
mirror of https://github.com/golang/go synced 2024-11-19 23:44:43 -07:00
go/src/sync
Dmitriy Vyukov af3868f187 sync: release Pool memory during second and later GCs
Pool memory was only being released during the first GC after the first Put.

Put assumes that p.local != nil means p is on the allPools list.
poolCleanup (called during each GC) removed each pool from allPools
but did not clear p.local, so each pool was cleared by exactly one GC
and then never cleared again.

This bug was introduced late in the Go 1.3 release cycle.

Fixes #8979.

LGTM=rsc
R=golang-codereviews, bradfitz, r, rsc
CC=golang-codereviews, khr
https://golang.org/cl/162980043
2014-10-22 20:23:49 +04:00
..
atomic runtime: more NOPTR 2014-09-24 19:04:06 -04:00
cond_test.go
cond.go
example_test.go
export_test.go
mutex_test.go
mutex.go
once_test.go sync: simplify TestOncePanic 2014-09-16 14:22:33 -07:00
once.go
pool_test.go sync: release Pool memory during second and later GCs 2014-10-22 20:23:49 +04:00
pool.go sync: release Pool memory during second and later GCs 2014-10-22 20:23:49 +04:00
race0.go
race.go
runtime_sema_test.go
runtime.go
rwmutex_test.go
rwmutex.go
waitgroup_test.go
waitgroup.go