feat: Add --gc-frequency option to debug-build.sh#1395
Open
TartanLlama wants to merge 4 commits intomainfrom
Open
feat: Add --gc-frequency option to debug-build.sh#1395TartanLlama wants to merge 4 commits intomainfrom
--gc-frequency option to debug-build.sh#1395TartanLlama wants to merge 4 commits intomainfrom
Conversation
--gc-frequency option to debug-build.sh--gc-frequency option to debug-build.sh
zkat
approved these changes
Mar 26, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
JS::SetGCZealfunction runs the garbage collector at a higher frequency to help find memory bugs. This PR introduces a way to include it for debug builds:-DFASTLY_GC_FREQUENCY, which sets the number of allocations between GC runsdebug-build.shscript has a new--gc-frequencyflag to set thisJS::SetGCZealis called at startup so long asFASTLY_GC_FREQUENCYandJS_GC_ZEALare set (the latter is set by the JS runtime in debug builds)Currently this is just for local testing, although we could add this to CI if we wanted. The easiest way to run it is
npm run build:debug -- --gc-frequency 100(100 is a decent frequency for finding bugs)Fixes #1204.