You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently it seems that GC can trigger a collection any time a new Gc is allocated. I would like to have manual control over when collection can happen. (I mean I want to prevent automatic collections during allocation from happening and instead manually call a function that checks the threshold and collects if there is too much allocated memory.)
The text was updated successfully, but these errors were encountered:
FeldrinH
changed the title
Better control over when GC runs
Manual control over when GC runs
Jul 4, 2023
Yes that would be nice to have. For example in a scripting language used in a game, one would like to run the garbage collection in between frames (e.g., after the frame has been rendered and sent to the display).
How big of a change would that feature be?
I don't think it would be that big. We already have a force_collect() function exposed. We can expose a second maybe_collect() that applies the threshold, and then have a way to disable the one place that collection is called automatically.
Currently it seems that GC can trigger a collection any time a new Gc is allocated. I would like to have manual control over when collection can happen. (I mean I want to prevent automatic collections during allocation from happening and instead manually call a function that checks the threshold and collects if there is too much allocated memory.)
The text was updated successfully, but these errors were encountered: