]> Cypherpunks repositories - gostls13.git/commit
runtime: set heap minimum default based on GOGC
authorRick Hudson <rlh@golang.org>
Wed, 6 May 2015 19:58:20 +0000 (15:58 -0400)
committerRick Hudson <rlh@golang.org>
Thu, 7 May 2015 21:05:58 +0000 (21:05 +0000)
commitb6e178ed7ee4781020b5e2d2dbc5346e8de42ee2
tree0eae6360d431fc343ef32bf623526d43bdf2449a
parent7bdeab1b2f54b22e7840b601b2d90188f6ee8ae0
runtime: set heap minimum default based on GOGC

Currently the heap minimum is set to 4MB which prevents our ability to
collect at every allocation by setting GOGC=0. This adjust the
heap minimum to 4MB*GOGC/100 thus reenabling collecting at every allocation.
Fixes #10681

Change-Id: I912d027dac4b14ae535597e8beefa9ac3fb8ad94
Reviewed-on: https://go-review.googlesource.com/9814
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
src/runtime/mgc.go
src/runtime/runtime1.go