[fix] Force mbind on allocation from arena
The way jemalloc handles big allocations can often result in surprising calls to mmap/mbind (splitting allocations, rounded up sizes). It also makes the path between an aml_alloc and mbind quite difficult to see. More worrying, if jemalloc reuses a previous allocation, the mbind will not be called again, which might result in the wrong binding happening. To fix those issues, we move the mbind logic to be around the allocations returned from jemalloc. This will ensure that we always bind properly. The only issue is that it might slow down allocations. It can also cause issues if the same arena is used by multiple areas, as allocations might be overlapping a page. We will move away from sharing arenas for benchmarks from now on.
Showing with 17 additions and 8 deletions