diff options
| author | Rick Hudson <rlh@golang.org> | 2015-05-06 15:58:20 -0400 |
|---|---|---|
| committer | Rick Hudson <rlh@golang.org> | 2015-05-07 21:05:58 +0000 |
| commit | b6e178ed7ee4781020b5e2d2dbc5346e8de42ee2 (patch) | |
| tree | 0eae6360d431fc343ef32bf623526d43bdf2449a /src/runtime/runtime1.go | |
| parent | 7bdeab1b2f54b22e7840b601b2d90188f6ee8ae0 (diff) | |
| download | go-b6e178ed7ee4781020b5e2d2dbc5346e8de42ee2.tar.xz | |
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>
Diffstat (limited to 'src/runtime/runtime1.go')
| -rw-r--r-- | src/runtime/runtime1.go | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/src/runtime/runtime1.go b/src/runtime/runtime1.go index 2151be59f9..ea3883018b 100644 --- a/src/runtime/runtime1.go +++ b/src/runtime/runtime1.go @@ -432,15 +432,3 @@ func reflect_typelinks() [][]*_type { } return ret } - -// TODO: move back into mgc.go -func readgogc() int32 { - p := gogetenv("GOGC") - if p == "" { - return 100 - } - if p == "off" { - return -1 - } - return int32(atoi(p)) -} |
