-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[release-branch.go1.14] runtime/debug: add SetMaxHeap API
DO NOT SUBMIT. This is an experiment to get some experience with the API and figure out if this is even a reasonable primitive. This adds an API to set a soft limit on the heap size. This augments the existing GOGC-based GC policy by using the lower of the GOGC-computed GC target and the heap limit. When the garbage collector is bounded by the heap limit, it can no longer amortize the cost of garbage collection against the cost of growing the heap. Hence, callers of this API are required to register for notifications of when the garbage collector is under pressure and are strongly encouraged/expected to use this signal to shed load. This CL incorporates fixes from CL 151540, CL 156917, and CL 183317 by [email protected]. Updates golang#29696. Change-Id: I82e6df42ada6bd77f0a998a8ac021058996a8d65
- Loading branch information
Showing
5 changed files
with
459 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.