Skip to content

Commit

Permalink
elfmalloc: Mark GlobalAllocProvider Send to satisfy lazy_static
Browse files Browse the repository at this point in the history
  • Loading branch information
joshlf committed Mar 17, 2018
1 parent 8d25413 commit 1630c22
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions elfmalloc/src/general.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ pub(crate) mod global {
// safe only because ElfMalloc (and PageAlloc, and TieredSizeClasses) have thread-safe clone
// methods.
unsafe impl Sync for GlobalAllocProvider {}
unsafe impl Send for GlobalAllocProvider {}
impl GlobalAllocProvider {
fn new() -> GlobalAllocProvider {
GlobalAllocProvider { inner: Some(ElfMalloc::new()) }
Expand Down

0 comments on commit 1630c22

Please sign in to comment.