Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/containers/storage/heap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ pub struct Heap<T> {
_marker: PhantomData<T>,
}

// SAFETY: `Heap<T>` can be sent to another thread if `T` can be sent to another thread. It's because we use system allocation which is send-safe.
unsafe impl<T: Send> Send for Heap<T> {}

impl<T> Heap<T> {
fn layout(capacity: u32) -> Option<Layout> {
(capacity as usize)
Expand Down
Loading