这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@hawkw
Copy link
Owner

@hawkw hawkw commented May 10, 2023

This branch adds an implementation of a singly-linked mutable FIFO
Stackand a singly-linked lock-free FIFO TransferStack in
cordyceps::stack.

A Stack is just your traditional FIFO stack structure.
TransferStack is a bit more interesting --- it's a simplification of
the traditional lock-free Treiber stack wher all elements are popped
into a new mutable Stack in a single atomic operation. This avoids the
ABA problem issues common with naive Treiber stack implementations. It's
intended primarily for use in a mimalloc-style sharded per-core memory
allocator.

Closes #137

@hawkw hawkw enabled auto-merge (squash) May 10, 2023 21:16
@hawkw hawkw self-assigned this May 10, 2023
@hawkw hawkw added kind/enhancement New feature or request crate/cordyceps Related to the `cordyceps` crate labels May 10, 2023
@hawkw hawkw merged commit 507b993 into main May 10, 2023
@hawkw hawkw deleted the eliza/transfer-stack branch May 10, 2023 21:36
hawkw added a commit that referenced this pull request May 12, 2023
This branch adds an implementation of a singly-linked mutable FIFO
`Stack`and a singly-linked lock-free FIFO `TransferStack` in
`cordyceps::stack`.

A `Stack` is just your traditional FIFO stack structure.
`TransferStack` is a bit more interesting --- it's a simplification of
the traditional lock-free Treiber stack wher all elements are popped
into a new mutable `Stack` in a single atomic operation. This avoids the
ABA problem issues common with naive Treiber stack implementations. It's
intended primarily for use in a `mimalloc`-style sharded per-core memory
allocator.

Closes #137

Signed-off-by: Eliza Weisman <eliza@elizaswebsite>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

crate/cordyceps Related to the `cordyceps` crate kind/enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cordyceps: intrusive transfer stack

2 participants