12 releases

0.1.20 Aug 20, 2020
0.1.19 Apr 23, 2020
0.1.18 Mar 12, 2020
0.1.11 Dec 7, 2019
0.1.5 Jul 2, 2019

#14 in Memory management

Download history 396/week @ 2020-06-01 381/week @ 2020-06-08 407/week @ 2020-06-15 732/week @ 2020-06-22 1013/week @ 2020-06-29 850/week @ 2020-07-06 606/week @ 2020-07-13 1105/week @ 2020-07-20 1247/week @ 2020-07-27 1083/week @ 2020-08-03 1199/week @ 2020-08-10 1124/week @ 2020-08-17 1356/week @ 2020-08-24 1315/week @ 2020-08-31 1687/week @ 2020-09-07 1350/week @ 2020-09-14

3,592 downloads per month
Used in less than 12 crates

MIT license

1MB
12K SLoC

C 7K SLoC // 0.2% comments JavaScript 2.5K SLoC // 0.1% comments Visual Studio Project 2K SLoC Rust 443 SLoC // 0.0% comments C++ 156 SLoC // 0.1% comments Visual Studio Solution 151 SLoC

Mimalloc Rust

Build Status Latest Version Documentation

A drop-in global allocator wrapper around the mimalloc allocator. Mimalloc is a general purpose, performance oriented allocator built by Microsoft.

Usage

use mimalloc::MiMalloc;

#[global_allocator]
static GLOBAL: MiMalloc = MiMalloc;

Requirements

CMake and a C compiler are required for building mimalloc with cargo.

Usage without secure mode

By default this library builds mimalloc in secure mode. This add guard pages, randomized allocation, encrypted free lists, etc. The performance penalty is usually around 10% according to mimalloc own benchmarks.

To disable secure mode, put in Cargo.toml:

[dependencies]
mimalloc = { version = "*", default-features = false }

Dependencies