[package]
edition = "2021"
rust-version = "1.88"
name = "sefer-alloc"
version = "0.2.1"
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "A safe-by-construction, 100% Rust memory toolkit (no C/C++ libraries — no libnuma/mimalloc/jemalloc/snmalloc/tcmalloc): a single-threaded handle store (Region<T>) and a drop-in #[global_allocator] (SeferAlloc) over one verified segment substrate, with #![forbid(unsafe_code)] at the top."
homepage = "https://github.com/PHPCraftdream/sefer-alloc"
documentation = "https://docs.rs/sefer-alloc"
readme = "README.md"
keywords = [
"allocator",
"arena",
"generational",
"handle",
"lock-free",
]
categories = [
"data-structures",
"memory-management",
"concurrency",
"no-std",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/PHPCraftdream/sefer-alloc"
[features]
alloc = ["alloc-core"]
alloc-core = [
"std",
"dep:aligned-vmem",
]
alloc-decommit = ["alloc-core"]
alloc-global = ["alloc"]
alloc-xthread = ["alloc"]
default = ["std"]
experimental = [
"std",
"dep:arc-swap",
"dep:crossbeam-epoch",
]
fastbin = ["alloc-global"]
numa-aware = [
"alloc-core",
"dep:numa-shim",
]
pinning = [
"experimental",
"dep:core_affinity",
]
production = [
"alloc-global",
"alloc-xthread",
"alloc-decommit",
"fastbin",
]
std = ["sefer-region/std"]
[lib]
name = "sefer_alloc"
path = "src/lib.rs"
[[example]]
name = "global_allocator"
path = "examples/global_allocator.rs"
required-features = ["alloc-global"]
[[example]]
name = "malloc_macro"
path = "examples/malloc_macro.rs"
required-features = [
"alloc-global",
"alloc-xthread",
]
[[example]]
name = "rss_probe"
path = "examples/rss_probe.rs"
required-features = [
"alloc-global",
"alloc-xthread",
]
[[example]]
name = "soak_xthread"
path = "examples/soak_xthread.rs"
required-features = [
"alloc-global",
"alloc-xthread",
]
[[example]]
name = "tokio_burn_in"
path = "examples/tokio_burn_in.rs"
required-features = [
"alloc-global",
"alloc-xthread",
]
[[test]]
name = "alloc_core_batch"
path = "tests/alloc_core_batch.rs"
[[test]]
name = "alloc_core_differential"
path = "tests/alloc_core_differential.rs"
[[test]]
name = "alloc_core_invariants"
path = "tests/alloc_core_invariants.rs"
[[test]]
name = "alloc_core_reentrancy"
path = "tests/alloc_core_reentrancy.rs"
[[test]]
name = "compaction"
path = "tests/compaction.rs"
[[test]]
name = "concurrent_stress"
path = "tests/concurrent_stress.rs"
[[test]]
name = "dealloc_sublinear"
path = "tests/dealloc_sublinear.rs"
[[test]]
name = "decommit_miri_cycle"
path = "tests/decommit_miri_cycle.rs"
[[test]]
name = "decommit_soak"
path = "tests/decommit_soak.rs"
[[test]]
name = "decommit_stale_ring"
path = "tests/decommit_stale_ring.rs"
[[test]]
name = "differential"
path = "tests/differential.rs"
[[test]]
name = "double_free_guard"
path = "tests/double_free_guard.rs"
[[test]]
name = "epoch"
path = "tests/epoch.rs"
[[test]]
name = "global_alloc"
path = "tests/global_alloc.rs"
[[test]]
name = "global_alloc_installed"
path = "tests/global_alloc_installed.rs"
[[test]]
name = "global_alloc_mt"
path = "tests/global_alloc_mt.rs"
[[test]]
name = "heap_core_bulk_bypass"
path = "tests/heap_core_bulk_bypass.rs"
[[test]]
name = "heap_core_tcache"
path = "tests/heap_core_tcache.rs"
[[test]]
name = "heap_core_tcache_decommit"
path = "tests/heap_core_tcache_decommit.rs"
[[test]]
name = "heap_core_tcache_m2"
path = "tests/heap_core_tcache_m2.rs"
[[test]]
name = "heap_core_tcache_stamp"
path = "tests/heap_core_tcache_stamp.rs"
[[test]]
name = "heap_cross_segment"
path = "tests/heap_cross_segment.rs"
[[test]]
name = "heap_cross_thread"
path = "tests/heap_cross_thread.rs"
[[test]]
name = "heap_diag"
path = "tests/heap_diag.rs"
[[test]]
name = "heap_differential"
path = "tests/heap_differential.rs"
[[test]]
name = "heap_invariants"
path = "tests/heap_invariants.rs"
[[test]]
name = "heap_miri_xthread"
path = "tests/heap_miri_xthread.rs"
[[test]]
name = "heap_soak"
path = "tests/heap_soak.rs"
[[test]]
name = "large_cache"
path = "tests/large_cache.rs"
[[test]]
name = "large_cache_budget"
path = "tests/large_cache_budget.rs"
[[test]]
name = "large_cache_config_knobs"
path = "tests/large_cache_config_knobs.rs"
[[test]]
name = "large_cache_decay"
path = "tests/large_cache_decay.rs"
[[test]]
name = "large_cache_mode"
path = "tests/large_cache_mode.rs"
[[test]]
name = "lock_free"
path = "tests/lock_free.rs"
[[test]]
name = "loom_bootstrap_cas"
path = "tests/loom_bootstrap_cas.rs"
[[test]]
name = "loom_epoch"
path = "tests/loom_epoch.rs"
[[test]]
name = "loom_registry"
path = "tests/loom_registry.rs"
[[test]]
name = "loom_remote_ring"
path = "tests/loom_remote_ring.rs"
[[test]]
name = "loom_sharded"
path = "tests/loom_sharded.rs"
[[test]]
name = "loom_thread_free"
path = "tests/loom_thread_free.rs"
[[test]]
name = "loom_xthread_protocol"
path = "tests/loom_xthread_protocol.rs"
[[test]]
name = "numa_alloc"
path = "tests/numa_alloc.rs"
[[test]]
name = "numa_seam"
path = "tests/numa_seam.rs"
[[test]]
name = "numa_segment_id"
path = "tests/numa_segment_id.rs"
[[test]]
name = "phase13_3_dealloc_layout_class"
path = "tests/phase13_3_dealloc_layout_class.rs"
[[test]]
name = "phase13_drain_reclaim_layout_class"
path = "tests/phase13_drain_reclaim_layout_class.rs"
[[test]]
name = "pinning"
path = "tests/pinning.rs"
[[test]]
name = "race_norecycle"
path = "tests/race_norecycle.rs"
[[test]]
name = "race_repro"
path = "tests/race_repro.rs"
[[test]]
name = "realloc_in_place"
path = "tests/realloc_in_place.rs"
[[test]]
name = "reclaim_offset_unit"
path = "tests/reclaim_offset_unit.rs"
[[test]]
name = "region_invariants"
path = "tests/region_invariants.rs"
[[test]]
name = "registry_basic"
path = "tests/registry_basic.rs"
[[test]]
name = "regression_large_align_no_segment_exhaustion"
path = "tests/regression_large_align_no_segment_exhaustion.rs"
[[test]]
name = "remote_ring_unit"
path = "tests/remote_ring_unit.rs"
[[test]]
name = "sefer_alloc_with_config"
path = "tests/sefer_alloc_with_config.rs"
[[test]]
name = "segment_table_hash"
path = "tests/segment_table_hash.rs"
[[test]]
name = "segment_table_recycle"
path = "tests/segment_table_recycle.rs"
[[test]]
name = "sharded"
path = "tests/sharded.rs"
[[test]]
name = "sharded_remote"
path = "tests/sharded_remote.rs"
[[test]]
name = "size_classes_lookup"
path = "tests/size_classes_lookup.rs"
[[test]]
name = "stamp_cache"
path = "tests/stamp_cache.rs"
[[bench]]
name = "global_alloc"
path = "benches/global_alloc.rs"
harness = false
required-features = ["alloc-global"]
[[bench]]
name = "heap_alloc"
path = "benches/heap_alloc.rs"
harness = false
required-features = ["alloc"]
[[bench]]
name = "heap_async_pattern"
path = "benches/heap_async_pattern.rs"
harness = false
required-features = ["alloc-global"]
[[bench]]
name = "heap_xthread"
path = "benches/heap_xthread.rs"
harness = false
required-features = [
"alloc-core",
"alloc-xthread",
]
[[bench]]
name = "large_realloc"
path = "benches/large_realloc.rs"
harness = false
required-features = ["alloc-global"]
[[bench]]
name = "locality"
path = "benches/locality.rs"
harness = false
[[bench]]
name = "pinned_write"
path = "benches/pinned_write.rs"
harness = false
required-features = ["pinning"]
[[bench]]
name = "sharded_write"
path = "benches/sharded_write.rs"
harness = false
required-features = ["experimental"]
[dependencies.aligned-vmem]
version = "0.1"
optional = true
[dependencies.arc-swap]
version = "1"
optional = true
[dependencies.core_affinity]
version = "0.8"
optional = true
[dependencies.crossbeam-epoch]
version = "0.9"
optional = true
[dependencies.numa-shim]
version = "0.1"
features = ["vmem-integration"]
optional = true
[dependencies.sefer-region]
version = "0.1"
default-features = false
[dev-dependencies.criterion]
version = "0.5"
[dev-dependencies.mimalloc]
version = "0.1"
[dev-dependencies.proptest]
version = "1"
[dev-dependencies.slotmap]
version = "1"
[dev-dependencies.tokio]
version = "1"
features = [
"rt-multi-thread",
"macros",
"sync",
"time",
]
[target."cfg(loom)".dev-dependencies.loom]
version = "0.7"
[lints.rust.unexpected_cfgs]
level = "warn"
priority = 0
check-cfg = ["cfg(loom)"]