diff options
| author | Austin Clements <austin@google.com> | 2015-08-03 09:25:23 -0400 |
|---|---|---|
| committer | Austin Clements <austin@google.com> | 2015-08-04 18:54:41 +0000 |
| commit | e30c6d64bac1b5a31a7062dff89744332bebc23e (patch) | |
| tree | 15f062d0daa110781b4e090b78801d0451a14653 /src/runtime/malloc.go | |
| parent | fb5230af8a0d416fa69049f71eb1271c053e7b8c (diff) | |
| download | go-e30c6d64bac1b5a31a7062dff89744332bebc23e.tar.xz | |
runtime: always give concurrent sweep some heap distance
Currently it's possible for the next_gc heap size trigger computed for
the next GC cycle to be less than the current allocated heap size.
This means the next cycle will start immediately, which means there's
no time to perform the concurrent sweep between GC cycles. This places
responsibility for finishing the sweep on GC itself, which delays GC
start-up and hence delays mutator assist.
Fix this by ensuring that next_gc is always at least a little higher
than the allocated heap size, so we won't trigger the next cycle
instantly.
Updates #11911.
Change-Id: I74f0b887bf187518d5fedffc7989817cbcf30592
Reviewed-on: https://go-review.googlesource.com/13043
Reviewed-by: Rick Hudson <rlh@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/runtime/malloc.go')
0 files changed, 0 insertions, 0 deletions
