| Crates.io | alloc_geiger |
| lib.rs | alloc_geiger |
| version | 0.3.0 |
| created_at | 2019-08-13 22:16:11.61938+00 |
| updated_at | 2025-03-10 17:30:37.531577+00 |
| description | A Rust allocator which makes sound when active, like a Geiger counter. |
| homepage | |
| repository | https://github.com/cuviper/alloc_geiger |
| max_upload_size | |
| id | 156582 |
| size | 46,594 |
A Rust allocator which makes sound when active, like a Geiger counter.
The rodio crate is used to emit sinc pulses each time the allocator is
used, excluding its own allocator activity.
Inspired by Malloc Geiger.
To use alloc_geiger add it as a dependency:
# Cargo.toml
[dependencies]
alloc_geiger = "0.3"
To set alloc_geiger::Geiger as the global allocator, it must be initialized
with an underlying allocator. The type System alias and the new() method
make it easy to use the default system allocator:
#[global_allocator]
static ALLOC: alloc_geiger::System = alloc_geiger::System::new();
Alternatives like jemallocator may also be used:
use alloc_geiger::Geiger;
use jemallocator::Jemalloc;
#[global_allocator]
static ALLOC: Geiger<Jemalloc> = Geiger::with_alloc(Jemalloc);
This project is licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in alloc_geiger by you, as defined in the Apache-2.0 license,
shall be dual licensed as above, without any additional terms or conditions.