11 releases

0.1.19 Apr 23, 2020
0.1.18 Mar 12, 2020
0.1.17 Feb 19, 2020
0.1.11 Dec 7, 2019
0.1.5 Jul 2, 2019

#26 in Memory management

Download history 724/week @ 2020-04-14 761/week @ 2020-04-21 423/week @ 2020-04-28 397/week @ 2020-05-05 743/week @ 2020-05-12 794/week @ 2020-05-19 732/week @ 2020-05-26 399/week @ 2020-06-02 367/week @ 2020-06-09 402/week @ 2020-06-16 870/week @ 2020-06-23 1046/week @ 2020-06-30 699/week @ 2020-07-07 727/week @ 2020-07-14 1162/week @ 2020-07-21 1127/week @ 2020-07-28

2,577 downloads per month
Used in less than 6 crates

MIT license

780KB
12K SLoC

C 7K SLoC // 0.2% comments JavaScript 2K SLoC // 0.1% comments Visual Studio Project 2K SLoC Rust 248 SLoC // 0.2% comments Visual Studio Solution 151 SLoC C++ 104 SLoC // 0.1% comments

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