{"id":60002,"library":"stats-alloc","title":"Stats Alloc","description":"An allocator wrapper that allows for instrumenting global allocators","status":"active","version":"0.1.10","language":"rust","source_language":null,"source_url":"https://github.com/neoeinstein/stats_alloc","tags":["allocator","instrumentation","profiling","memory"],"install":[{"cmd":"# Cargo.toml\n[dependencies]\nstats_alloc = \"0.1.10\"","lang":"toml","label":"Cargo.toml"},{"cmd":"cargo add stats_alloc","lang":"bash","label":"cargo add"}],"dependencies":[],"imports":[{"symbol":"StatsAlloc","correct":"use stats_alloc::StatsAlloc;"}],"quickstart":{"code":"use stats_alloc::StatsAlloc;\nuse std::alloc::System;\n\n#[global_allocator]\nstatic GLOBAL: StatsAlloc<System> = StatsAlloc::new(System);\n\nfn main() {\n    let stats = GLOBAL.stats();\n    println!(\"Allocations: {}\", stats.allocations);\n}","lang":"rust","description":"Wraps the global allocator to collect allocation statistics"},"warnings":[{"fix":"Place #[global_allocator] static at the top of main.rs or lib.rs","message":"Must be set as global allocator before any allocations occur","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"search_vec":"'alloc':2,4,11,12 'allow':7 'global':10 'instrument':9,13 'memori':15 'profil':14 'stat':1 'wrapper':5","created_at":"2026-06-16T17:24:08.892574+00:00","updated_at":"2026-06-16T17:24:08.892574+00:00","problems":[],"ecosystem":"crates","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/neoeinstein/stats_alloc","github":"https://github.com/neoeinstein/stats_alloc","docs":"https://docs.rs/stats_alloc/","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["utility","observability"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-16","next_check":"2026-12-13","install_tag":null}}