Jorge Aparicio 25b9b06d1c CAS Pool x86_64: lazily initialized ANCHOR
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)
2021-08-26 14:17:43 +02:00
2021-04-27 19:03:12 +02:00
2021-04-22 20:00:30 +02:00
2021-08-16 14:16:52 +02:00
2017-03-05 00:30:10 -05:00
2017-03-05 00:30:10 -05:00
2021-03-25 16:30:45 +01:00

crates.io crates.io

heapless

static friendly data structures that don't require dynamic memory allocation

Documentation

Change log

Tests

# run all
cargo test --features 'serde','x86-sync-pool'
# run only for example histbuf tests
cargo test histbuf --features 'serde','x86-sync-pool'

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Description
Heapless, static friendly data structures
Readme 18 MiB
Languages
Rust 100%