The force flag to releaseToOSMaybe does not release everything
since it is an expensive operation. Modify the release flag to
have three states: normal, force, forceall. Force behaves the same
as setting Force to true from before this change. Forceall will
release everything regardless of how much time it takes, or
how much there is to release.
In addition, add a new mallopt that will call the release function
with the forceall flag set.
nit: I prefer having the brackets here because the predicate has multiple lines
BTW, it seems that I missed this before. I'm thinking if we should just delete the check here. The logic here is done while examining each memory group.
If we still want a high level rule, I would suggest to update the heuristic here. So far, I prefer to remove it but not a strong preference