Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BorrowMutError in TlsfHeap when inserting into BTreeMap #100

Open
nathaniel-bennett opened this issue Jan 15, 2025 · 0 comments
Open

BorrowMutError in TlsfHeap when inserting into BTreeMap #100

nathaniel-bennett opened this issue Jan 15, 2025 · 0 comments

Comments

@nathaniel-bennett
Copy link

I've run into an issue where my project returns the following error:

thread '<unnamed>' panicked at /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/embedded-alloc-0.6.0/src/tlsf.rs:62:58:
already borrowed: BorrowMutError
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Aborted

My Cargo.toml contains the following:

embedded-alloc = { version = "0.6.0", features = ["tlsf", "allocator_api"] }
critical-section = { version = "1.1", features = ["std"]}

...which should normally mean that std::sync::Mutex is used under the hood to deal with concurrent accesses. Since the TlsfHeap likewise uses this Mutex under the hood to control accesses into the RefCell, I have a feeling that this may be an error internal to the TlsfHeap implementation in some way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant