• Austin Clements's avatar
    runtime: minor clean up to heapminimum · f4d51eb2
    Austin Clements authored
    Currently setGCPercent sets heapminimum to heapminimum*GOGC/100. The
    real intent is to set heapminimum to a scaled multiple of a fixed
    default heap minimum, not to scale heapminimum based on its current
    value. This turns out to be okay because setGCPercent is only called
    once and heapminimum is initially set to this default heap minimum.
    However, the code as written is confusing, especially since
    setGCPercent is otherwise written so it could be called again to
    change GOGC. Fix this by introducing a defaultHeapMinimum constant and
    using this instead of the current value of heapminimum to compute the
    scaled heap minimum.
    
    As part of this, this commit improves the documentation on
    heapminimum.
    
    Change-Id: I4eb82c73dc2eb44a6e5a17c780a747a2e73d7493
    Reviewed-on: https://go-review.googlesource.com/10181Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
    f4d51eb2
Name
Last commit
Last update
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...