purpleprotocol / mimalloc_rust

A Rust wrapper over Microsoft's MiMalloc memory allocator
MIT License
486 stars 42 forks source link

Addition of mimalloc V2 feature #66

Closed ryancinsight closed 2 years ago

ryancinsight commented 3 years ago

Based on #62 it would be interesting to allow user to select between using the v1 stable branch, v1 dev branch, and v2 dev branch as a feature with v1 stable as default.

ryancinsight commented 3 years ago

master is not the same as v2 according to mimalloc github page: master: latest stable release. dev: development branch for mimalloc v1. dev-slice: development branch for mimalloc v2 with a new algorithm for managing internal mimalloc pages.

as such the current stable release is 1.7.0: 2021-01-31, v1.7.0: stable release 1.7: support explicit user provided memory regions, more precise statistics, improve macOS overriding, initial support for Apple M1, improved DragonFly support, faster memcpy on Windows, various small fixes.

thus dev slice branch is 2.0.0: 2021-01-31, v2.0.0: beta release 2.0: new algorithm for managing internal mimalloc pages that tends to use reduce memory usage and fragmentation compared to mimalloc v1 (especially for large workloads). Should otherwise have similar performance (see below); please report if you observe any significant performance regression.

I also found dev-slice does not use region.c and instead has a segment-cache.c