Reconsider using MADV_FREE
Using MADV_FREE can be quite confusing for users as memory usage reported by top
includes LazyFree memory.
Other projects still always use MADV_DONTNEED
, for example:
https://go-review.googlesource.com/c/go/+/267100/
https://bugs.chromium.org/p/chromium/issues/detail?id=755284
We also reimplement some of the logic of MADV_FREE ourselves, by being reluctant to return memory to the OS.