-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(xsnap): enable gc() in the start compartment
Modify xsnap.c to add a `gc()` function to the globals of the initial ("start") Compartment. This function should trigger an immediate, synchronous, full GC sweep. As a non-standard global, the `gc()` function will be filtered out of the globals in all child Compartments by SES as usual. Note that this changes the snapshot format: heap snapshots written before this change cannot be read by code after this change. This happens because `gc()` (which is implemented in C) is a new "callback" (a C function made available to JS code), which is an "exit" from the reference graph. It must be recognized during serialization, and re-attached during reload, and xsnap cannot handle loading snapshots with a different set of exits, even purely additive changes. closes #2682 refs #2660 refs #2615
- Loading branch information
Showing
2 changed files
with
25 additions
and
8 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