tcmalloc-better 0.1.8

A Rust wrapper over Google's TCMalloc memory allocator
Documentation

TCMalloc better

A Rust wrapper over Google's TCMalloc memory allocator

Latest Version Documentation

A drop-in global allocator wrapper around the TCMalloc allocator. TCMalloc is a general-purpose, performance-oriented allocator built by Google.

Comparison with other tcmalloc wrappers

Current TCMalloc wrappers rely on gperftools, which has been in a detached state from the main development branch for over 10 years and lacks modern features such as per-CPU caching.

  • tcmalloc - Cons:
    • Outdated wrapper, which does not updates for years
    • Depends on gperftools-2.7
  • tcmalloc2 - Cons:
    • Wrapper which can not build in offline mode
    • Depends on gperftools-2.16

Usage

use tcmalloc_better::TCMalloc;

#[global_allocator]
static GLOBAL: TCMalloc = TCMalloc;

Requirements

A C++ compiler is required for building TCMalloc with cargo.