Registry / other / jemalloc-sys

jemalloc-sys

JSON →
library0.5.4+5.3.0-patchedrscratesunverified

Rust FFI bindings to jemalloc memory allocator.

# Cargo.toml [dependencies] jemalloc-sys = "0.5.4+5.3.0-patched"
INSTALL
IMPORT
SIG · JEMALLOC-SYS
J
jemalloc-sys
otherrustv0.5.4+5.3.0-patched
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.

malloc
use jemalloc_sys::malloc;

Allocates memory using jemalloc's malloc function.

use jemalloc_sys::malloc; use std::ffi::c_void; fn main() { unsafe { let ptr = malloc(100) as *mut u8; if !ptr.is_null() { // Use the allocated memory std::alloc::dealloc(ptr, std::alloc::Layout::from_size_align(100, 1).unwrap()); } } }
Debug
Known issues
gotchaDirect FFI calls are unsafe and require careful memory management.
fix
Prefer using jemallocator crate for safe integration.
affects: >=0.5.0
Upgrade
Version history
0.5.4+5.3.0-patchedlatest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
11 hits · last 30 days
node
10
Amazon
1
Resources
jemalloc-sys — cargo add jemalloc-sys · libregistry