]> Cypherpunks.ru repositories - gostls13.git/blobdiff - src/runtime/mcache.go
[dev.garbage] all: merge dev.cc into dev.garbage
[gostls13.git] / src / runtime / mcache.go
index d3afef6be6f065b6ed1d2005c2e02bf878bab2d8..08b1bc3597bc0a7b03298cf7ebb36302e27e1ae5 100644 (file)
@@ -38,7 +38,12 @@ func freemcache(c *mcache) {
        systemstack(func() {
                mCache_ReleaseAll(c)
                stackcache_clear(c)
-               gcworkbuffree(c.gcworkbuf)
+
+               // NOTE(rsc,rlh): If gcworkbuffree comes back, we need to coordinate
+               // with the stealing of gcworkbufs during garbage collection to avoid
+               // a race where the workbuf is double-freed.
+               // gcworkbuffree(c.gcworkbuf)
+
                lock(&mheap_.lock)
                purgecachedstats(c)
                fixAlloc_Free(&mheap_.cachealloc, unsafe.Pointer(c))