1 unstable release

0.3.0 Apr 10, 2019

#6 in #globalalloc

Download history 347/week @ 2024-07-19 287/week @ 2024-07-26 361/week @ 2024-08-02 270/week @ 2024-08-09 269/week @ 2024-08-16 271/week @ 2024-08-23 265/week @ 2024-08-30 174/week @ 2024-09-06 171/week @ 2024-09-13 354/week @ 2024-09-20 217/week @ 2024-09-27 223/week @ 2024-10-04 158/week @ 2024-10-11 235/week @ 2024-10-18 212/week @ 2024-10-25 382/week @ 2024-11-01

1,011 downloads per month
Used in 4 crates (via tcmalloc)

MIT/Apache

5KB
72 lines

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