• Dmitry Vyukov's avatar
    runtime: bound defer pools · 80590711
    Dmitry Vyukov authored
    The unbounded list-based defer pool can grow infinitely.
    This can happen if a goroutine routinely allocates a defer;
    then blocks on one P; and then unblocked, scheduled and
    frees the defer on another P.
    The scenario was reported on golang-nuts list.
    
    We've been here several times. Any unbounded local caches
    are bad and grow to infinite size. This change introduces
    central defer pool; local pools become fixed-size
    with the only purpose of amortizing accesses to the
    central pool.
    
    Change-Id: Iadcfb113ccecf912e1b64afc07926f0de9de2248
    Reviewed-on: https://go-review.googlesource.com/3741Reviewed-by: 's avatarKeith Randall <khr@golang.org>
    80590711
Name
Last commit
Last update
api Loading commit data...
doc Loading commit data...
include Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...