Registry / utility / tikv-jemallocator

tikv-jemallocator

JSON →
library0.7.0rscratesunverified

A Rust allocator backed by jemalloc, providing a drop-in replacement for the system allocator.

# Cargo.toml [dependencies] tikv-jemallocator = "0.7.0"
INSTALL
IMPORT
SIG · TIKV-JEMALLOCATOR
T
tikv-jemallocator
utilityrustv0.7.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Jemalloc
use tikv_jemallocator::Jemalloc;

Sets jemalloc as the global allocator for the program.

use tikv_jemallocator::Jemalloc; #[global_allocator] static GLOBAL: Jemalloc = Jemalloc; fn main() { let v = vec![1, 2, 3]; println!("Using jemalloc: {:?}", v); }
Debug
Known issues
gotchaUsing jemalloc may cause issues with certain system libraries or when debugging memory issues.
fix
Test thoroughly in your target environment; consider using `#[global_allocator]` only in the main binary, not in libraries.
affects: >=0.5.0
Upgrade
Version history
0.7.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Amazon
1
Resources
tikv-jemallocator — cargo add tikv-jemallocator · libregistry