8 releases

0.3.0 Apr 10, 2019
0.2.0 Feb 16, 2019
0.1.5 Feb 16, 2019
0.1.3 May 28, 2018

#433 in Memory management

Download history 318/week @ 2024-03-14 326/week @ 2024-03-21 332/week @ 2024-03-28 375/week @ 2024-04-04 283/week @ 2024-04-11 338/week @ 2024-04-18 274/week @ 2024-04-25 342/week @ 2024-05-02 334/week @ 2024-05-09 362/week @ 2024-05-16 279/week @ 2024-05-23 378/week @ 2024-05-30 372/week @ 2024-06-06 404/week @ 2024-06-13 345/week @ 2024-06-20 191/week @ 2024-06-27

1,419 downloads per month
Used in 4 crates

MIT/Apache

8KB

tcmalloc

A drop-in GlobalAlloc implementation using tcmalloc from gperftools.

Travis badge crates.io badge

Usage

Requires Rust 1.28+

extern crate tcmalloc;

use tcmalloc::TCMalloc;

#[global_allocator]
static GLOBAL: TCMalloc = TCMalloc;

Also note that you can only define one global allocator per application.

By default this crate expects to link to a system-installed tcmalloc. To build the bundled copy of tcmalloc, enable the "bundled" feature. Note the caveats about profiling and libunwind/libgcc on 64-bit linux — they are not built by this crate, and tcmalloc will silently link to versions of both that can cause profiling deadlocks.

Dependencies