I believe there's a way we can use this to effectively do allocation-free logging. Meaning: the cost of initializing the bump allocator is amortized by the duration of the program. Probably worth testing out!
-
-
Show this thread
-
Tested this and it turns out Bumpalo makes use of `Cell` under the hood to keep track of access (makes sense!) However this means we cannot use this across threads unless we wrap it in a Mutex.. which is exactly what we were trying to avoid!
Show this thread -
The reason why it needs to be thread-safe is b/c `log::Log: Send + Sync` https://docs.rs/log/0.4.8/log/trait.Log.html … It seems the *right* solution here would be to build a thread-safe bump allocator. It should be possible to build a lock-free version. But not even going to attempt building it hah.
Show this thread
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.