]> Cypherpunks repositories - gostls13.git/commit
runtime: increase GC concurrency.
authorRick Hudson <rlh@golang.org>
Tue, 6 Jan 2015 19:58:49 +0000 (14:58 -0500)
committerRick Hudson <rlh@golang.org>
Thu, 8 Jan 2015 20:34:56 +0000 (20:34 +0000)
commitdb7fd1c1420d5ef2f874f40c0349b35007568c77
treee5c38df7086b33171331ce9bea70555fdade564a
parentf21ee1e1d8a70abd130d0435eb1a1d2e95c88129
runtime: increase GC concurrency.

run GC in its own background goroutine making the
caller runnable if resources are available. This is
critical in single goroutine applications.
Allow goroutines that allocate a lot to help out
the GC and in doing so throttle their own allocation.
Adjust test so that it only detects that a GC is run
during init calls and not whether the GC is memory
efficient. Memory efficiency work will happen later
in 1.5.

Change-Id: I4306f5e377bb47c69bda1aedba66164f12b20c2b
Reviewed-on: https://go-review.googlesource.com/2349
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
src/runtime/malloc.go
src/runtime/mgc.go
src/runtime/mgc0.go
test/init1.go