That sounds OK. I'm just pointing out that it can be improved a bit by
exposing the "freeable_p" test and use it in sweep_foo so we don't even
try to free blocks when the free would be ignored.
Along the lines of the patch below.
Of course, maybe it's not worth the trouble.