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

#455 in Memory management

Download history 352/week @ 2024-11-08 477/week @ 2024-11-15 516/week @ 2024-11-22 883/week @ 2024-11-29 681/week @ 2024-12-06 628/week @ 2024-12-13 942/week @ 2024-12-20 444/week @ 2024-12-27 548/week @ 2025-01-03 774/week @ 2025-01-10 564/week @ 2025-01-17 388/week @ 2025-01-24 567/week @ 2025-01-31 1558/week @ 2025-02-07 717/week @ 2025-02-14

2,894 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