This adds AllocProfiler, an allocator implementation that tracks the number of allocations and bytes allocated during benchmarks. It can wrap any GlobalAlloc, such as mimalloc.
I believe I've pored over this code enough to be convinced that it's correct, so I'm going to merge it. Also, I can't come up with ways to make it faster without spending much more time.
This adds
AllocProfiler
, an allocator implementation that tracks the number of allocations and bytes allocated during benchmarks. It can wrap anyGlobalAlloc
, such asmimalloc
.Example benchmark output:![Screen Shot 2023-12-11 at 05 34 17](https://github.com/nvzqz/divan/assets/10367662/e0ea7a6a-dbc3-4dec-85ad-21c30ae94d94)