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
Are you sure?
Currently, mi_arenas_purge_expire contains a point in time after which arenas should be "purged".
So the condition in question will leave the function (and not do any purging) until that point in time is reached.
With your change, arenas will be purged if the time is not yet at mi_arenas_purge_expire; given that this is usually a time point in the future most of the time, and also updated to a time point in the future when purging, this means purging will happen continuously.
This is probably not how this is intended to work.
@res2k are you sure you're sure? 🙂 Changing to > would mean that we bail out when arenas_expire > now, i.e. when the expiration time has not yet arrived, which is what we want. It would also match the analogous condition in mi_arena_try_purge() on line 565.
In any case, this discussion shed more light on why there may be an issue than the initial PR description, so that's a win.
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
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.
According to:
mimalloc/src/arena.c
Line 565 in 8ff03b6
should be >, not <.