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

#462 in Memory management

Download history 468/week @ 2024-07-19 467/week @ 2024-07-26 531/week @ 2024-08-02 543/week @ 2024-08-09 593/week @ 2024-08-16 593/week @ 2024-08-23 554/week @ 2024-08-30 598/week @ 2024-09-06 275/week @ 2024-09-13 430/week @ 2024-09-20 306/week @ 2024-09-27 380/week @ 2024-10-04 263/week @ 2024-10-11 354/week @ 2024-10-18 463/week @ 2024-10-25 494/week @ 2024-11-01

1,619 downloads per month
Used in 5 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