]> Cypherpunks repositories - gostls13.git/commit
runtime: do not set m->locks around memory allocation
authorDmitriy Vyukov <dvyukov@google.com>
Fri, 2 May 2014 16:39:25 +0000 (17:39 +0100)
committerDmitriy Vyukov <dvyukov@google.com>
Fri, 2 May 2014 16:39:25 +0000 (17:39 +0100)
commit8afa086ce67b44abb9c9639efca214db7acf7b3f
tree0ef03554b60d166ee6590f72ee887d245249b9d9
parent350a8fcde14e936a4af33560b5365b18e822477a
runtime: do not set m->locks around memory allocation
If slice append is the only place where a program allocates,
then it will consume all available memory w/o triggering GC.
This was demonstrated in the issue.
Fixes #7922.

LGTM=rsc
R=golang-codereviews, rsc
CC=golang-codereviews, iant, khr
https://golang.org/cl/91010048
src/pkg/runtime/slice.goc