mirror of
https://github.com/rust-embedded/heapless.git
synced 2025-09-28 13:00:26 +00:00

this reduces the chances of hitting the 32-bit address space issue on x86_64 instead of (always) using a static ANCHOR variable located in .bss we lazily initialize the ANCHOR variable using the value passed to the first `Ptr::new` invocation. In practice, this means the very first `Pool::grow` (on x86_64) call is guaranteed to work (use the given memory). Follow up `grow` invocations are *more likely* to work (but not guaranteed) *if* all given memory comes from the heap. We still need an ANCHOR in .bss as a fallback because it's possible to allocate ZST on a pool without calling `Pool::grow` (= the lazily init ANCHOR is never initialized *but* it can be read)
64 lines
1.4 KiB
TOML
64 lines
1.4 KiB
TOML
[package]
|
|
authors = [
|
|
"Jorge Aparicio <jorge@japaric.io>",
|
|
"Per Lindgren <per.lindgren@ltu.se>",
|
|
"Emil Fresk <emil.fresk@gmail.com>",
|
|
]
|
|
categories = ["data-structures", "no-std"]
|
|
description = "`static` friendly data structures that don't require dynamic memory allocation"
|
|
documentation = "https://docs.rs/heapless"
|
|
edition = "2018"
|
|
keywords = ["static", "no-heap"]
|
|
license = "MIT OR Apache-2.0"
|
|
name = "heapless"
|
|
repository = "https://github.com/japaric/heapless"
|
|
version = "0.7.5"
|
|
|
|
[features]
|
|
default = ["cas"]
|
|
cas = ["atomic-polyfill"]
|
|
ufmt-impl = ["ufmt-write"]
|
|
# read the docs before enabling: makes `Pool` Sync on x86_64
|
|
x86-sync-pool = []
|
|
# only for tests
|
|
__trybuild = []
|
|
# Enable larger MPMC sizes.
|
|
mpmc_large = []
|
|
defmt-impl = ["defmt"]
|
|
|
|
[target.'cfg(any(target_arch = "x86_64", target_arch = "x86"))'.dev-dependencies]
|
|
scoped_threadpool = "0.1.8"
|
|
|
|
[target.thumbv6m-none-eabi.dependencies]
|
|
atomic-polyfill = { version = "0.1.2", optional = true }
|
|
|
|
[dependencies]
|
|
hash32 = "0.2.1"
|
|
|
|
[target.'cfg(target_arch = "x86_64")'.dependencies]
|
|
spin = "0.9.2"
|
|
|
|
[dependencies.serde]
|
|
version = "1"
|
|
optional = true
|
|
default-features = false
|
|
|
|
[dependencies.stable_deref_trait]
|
|
version = "1"
|
|
default-features = false
|
|
|
|
[dependencies.ufmt-write]
|
|
version = "0.1"
|
|
optional = true
|
|
|
|
[dev-dependencies.ufmt]
|
|
version = "0.1"
|
|
|
|
[dependencies.defmt]
|
|
version = "0.2.1"
|
|
optional = true
|
|
|
|
[dev-dependencies.defmt]
|
|
version = "0.2.1"
|
|
features = ["unstable-test"]
|