forked from ivmai/bdwgc
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add malloc calls for buffered finalization.
This introduces a new malloc function `GC_buffered_finalize_malloc` which ensures that unreachable objects are added to buffers to be later finalized. This API assumes that the first word in the block allocated with `GC_buffered_finalize_malloc` will contain the function pointer to the block's finaliser. This word must also be tagged in order to differentiate it from an empty block (where the first word is used as a threaded freelist implementation). The function `GC_finalize_objects` can then be called by the application (either on-demand or in a separate thread) in order to iterate through the chain of buffers and finalise objects. Because this happens on a mutator (i.e. application) thread, it will be paused when the collector stops the word.
- Loading branch information
1 parent
216d7de
commit 29d65b9
Showing
4 changed files
with
170 additions
and
0 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
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