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

#422 in Memory management

Download history 699/week @ 2023-12-14 401/week @ 2023-12-21 314/week @ 2023-12-28 831/week @ 2024-01-04 907/week @ 2024-01-11 756/week @ 2024-01-18 440/week @ 2024-01-25 439/week @ 2024-02-01 253/week @ 2024-02-08 436/week @ 2024-02-15 278/week @ 2024-02-22 200/week @ 2024-02-29 330/week @ 2024-03-07 318/week @ 2024-03-14 336/week @ 2024-03-21 289/week @ 2024-03-28

1,285 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