18 releases

0.1.26 Jun 18, 2021
0.1.25 Mar 6, 2021
0.1.24 Feb 5, 2021
0.1.22 Oct 9, 2020
0.1.5 Jul 2, 2019

#12 in Memory management

Download history 6253/week @ 2021-07-05 5585/week @ 2021-07-12 6224/week @ 2021-07-19 6047/week @ 2021-07-26 6705/week @ 2021-08-02 7636/week @ 2021-08-09 6639/week @ 2021-08-16 7463/week @ 2021-08-23 8363/week @ 2021-08-30 7922/week @ 2021-09-06 8227/week @ 2021-09-13 8007/week @ 2021-09-20 7908/week @ 2021-09-27 8158/week @ 2021-10-04 8251/week @ 2021-10-11 8991/week @ 2021-10-18

20,113 downloads per month
Used in 37 crates (36 directly)

MIT license

1MB
13K SLoC

C 7.5K SLoC // 0.2% comments JavaScript 2.5K SLoC // 0.1% comments Visual Studio Project 2K SLoC Rust 443 SLoC // 0.1% comments C++ 174 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

A C compiler is 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