| Crates.io | hardened-malloc |
| lib.rs | hardened-malloc |
| version | 13.0.0 |
| created_at | 2025-11-30 20:49:38.647325+00 |
| updated_at | 2025-12-07 15:56:32.897252+00 |
| description | Global allocator using GrapheneOS allocator |
| homepage | |
| repository | https://git.sr.ht/~alip/syd |
| max_upload_size | |
| id | 1958839 |
| size | 6,120 |
CONFIG_WERROR).light enables light mode, otherwise you're in default mode.seal enables CONFIG_SEAL_METADATA, noop if target env isn't GNU.small sets CONFIG_CLASS_REGION_SIZE to 4GiB (default: 32GiB).tiny sets CONFIG_CLASS_REGION_SIZE to 4MiB.GlobalAlloc::dealloc uses hardened allocator extension free_sized to
verify size.Cargo.toml.features = ["light"] as necessary.# Default allocator:
# GrapheneOS does not support 32-bit.
[target.'cfg(target_pointer_width = "64")'.dependencies]
hardened-malloc = { version = "13.0.0" }
With that in dependencies, you may change your default global allocator:
// Set global allocator to GrapheneOS allocator.
#[cfg(target_pointer_width = "64")]
#[global_allocator]
static GLOBAL: hardened_malloc::HardenedMalloc = hardened_malloc::HardenedMalloc;
Maintained by Ali Polatel. Up-to-date sources can be found at https://git.sr.ht/~alip/syd and bugs/patches can be submitted by email to ~alip/sydbox-devel@lists.sr.ht. Exherbo related bugs/issues can be submitted to https://gitlab.exherbo.org/groups/sydbox/-/issues. Discuss in #sydbox on Libera Chat.