-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add runtime option to eagerly run GC
Summary: Add a new runtime option called "Eval.EagerGCProbability". If set to a value greater than zero, a garbage collection will be eagerly run at every allocation or deallocation with probability 1/N. Eval.EnableGC must be set to 1 for this option to do anything. To avoid overhead in production, this option is only available in debug builds. This is implemented by doing a random coin-flip with the specified probability at every allocation or deallocation. If the coin-flip succeeds, a new surprise flag is set. A garbage collection is then done at the next surprise flag check. This is safer than attempting the garbage collection in the middle of the allocation. In the future, the surprise check flag will be used when we need to run a GC for real. Right now enabling this option often causes asserts to be triggered, because the heap isn't always in a fully consistent state even during the surprise flag checks. This is being worked on. Reviewed By: @edwinsmith Differential Revision: D2315369
- Loading branch information
1 parent
f076b8f
commit 024b0ea
Showing
6 changed files
with
41 additions
and
1 deletion.
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
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