rpmalloc-zig-port
rpmalloc-zig-port copied to clipboard
links to benchmarks, testing, metrics + docs
Great idea to port rpmalloc. I suggested this also on reddit. :)
benches
- https://github.com/daanx/mimalloc-bench
- https://github.com/mjansson/rpmalloc-benchmark
testing
- https://www.ryanliptak.com/blog/improving-fuzz-testing-with-zig-allocators/
- https://github.com/emeryberger/hangover
- valgrind with binding to the c api
metrics + docs
- https://stackoverflow.com/questions/16099646/how-to-evaluate-the-quality-of-custom-memory-allocator
- Influence of Cache configuration options are not well explained/measured.
- Notable missing docs of rpmalloc: ENABLE_GUARDS fragmentation costs and running some of the benchmarks provided by other malloc implementors.
Thank you for the links.
I'll note here that although I've left a good few of the ENABLE_GUARDs in tact, I did explicitly decide to omit a few, namely:
ENABLE_STATISTICS: to simplify codeENABLE_ADAPTIVE_THREAD_CACHE: similar reason toENABLE_STATISTICS. But as opposed to what the name would lead one to believe, it doesn't actually appear to be used in any sort of adaptive thread caching, seeming to exclusively exist as an add-on toENABLE_STATISTICS.ENABLE_OVERRIDE&ENABLE_PRELOAD: laziness and lack of infrastructureENABLE_VALIDATE_ARGS: most of the validation this enabled seemed like it shouldn't be disabled in the first place, and the one instance where it seemed reasonable seemed like it'd be better determined bystd.debug.runtime_safety.
That is of course all based partly off of investigation and my intuition.
Ah, lol. I did no expect the port to be done already. My criticism on missing metrics + docs was mainly on the upstream project.