]> Cypherpunks repositories - gostls13.git/commit
runtime: ensure minimum heap distance via heap goal
authorAustin Clements <austin@google.com>
Thu, 8 Oct 2015 05:37:15 +0000 (22:37 -0700)
committerAustin Clements <austin@google.com>
Fri, 9 Oct 2015 19:38:39 +0000 (19:38 +0000)
commit9e77c898688529c4d73ad8912d47b20e679a2cfa
treefc6568dc6f2523ec4b61bc8f8ecbb4856569b83e
parent8e8219deb5166ee67c8ba4409692de6fd7b67303
runtime: ensure minimum heap distance via heap goal

Currently we ensure a minimum heap distance of 1MB when computing the
assist ratio. Rather than enforcing this minimum on the heap distance,
it makes more sense to enforce that the heap goal itself is at least
1MB over the live heap size at the beginning of GC. Currently the two
approaches are semantically equivalent, but this will let us switch to
basing the assist ratio on current heap distance rather than the
initial heap distance, since we can't enforce this minimum on the
current heap distance (the GC may never finish because the goal posts
will always be 1MB away).

Change-Id: I0027b1c26a41a0152b01e5b67bdb1140d43ee903
Reviewed-on: https://go-review.googlesource.com/15604
Reviewed-by: Rick Hudson <rlh@golang.org>
src/runtime/mgc.go
src/runtime/mheap.go