You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This single line of code throw multiple instances of the following error: "shared static variables must have a type that implements Sync", it works perfectly if is use it as a global allocator.
Am i doing something wrong?
Detailed Errors:
*mut Option<NonNull<good_memory_allocator::chunks::FreeChunk>> cannot be shared between threads safely
within good_memory_allocator::Allocator<20, 8>, the trait Sync is not implemented for *mut Option<NonNull<good_memory_allocator::chunks::FreeChunk>>
shared static variables must have a type that implements Syncrustc
chunks.rs(750, 12): required because it appears within the type FakeFreeChunk
lib.rs(113, 12): required because it appears within the type Allocator<20, 8>
NonNull<good_memory_allocator::chunks::FreeChunk> cannot be shared between threads safely
within good_memory_allocator::Allocator<20, 8>, the trait Sync is not implemented for NonNull<good_memory_allocator::chunks::FreeChunk>
shared static variables must have a type that implements Syncrustc
option.rs(563, 10): required because it appears within the type Option<NonNull<FreeChunk>>
chunks.rs(750, 12): required because it appears within the type FakeFreeChunk
lib.rs(113, 12): required because it appears within the type Allocator<20, 8>
The text was updated successfully, but these errors were encountered:
#![no_std]
#![no_main]
#![feature(allocator_api)]
pub static SPINALLOCATOR: Allocator = Allocator::empty();
This single line of code throw multiple instances of the following error: "shared static variables must have a type that implements
Sync
", it works perfectly if is use it as a global allocator.Am i doing something wrong?
Detailed Errors:
*mut Option<NonNull<good_memory_allocator::chunks::FreeChunk>>
cannot be shared between threads safelywithin
good_memory_allocator::Allocator<20, 8>
, the traitSync
is not implemented for*mut Option<NonNull<good_memory_allocator::chunks::FreeChunk>>
shared static variables must have a type that implements
Sync
rustcchunks.rs(750, 12): required because it appears within the type
FakeFreeChunk
lib.rs(113, 12): required because it appears within the type
Allocator<20, 8>
NonNull<good_memory_allocator::chunks::FreeChunk>
cannot be shared between threads safelywithin
good_memory_allocator::Allocator<20, 8>
, the traitSync
is not implemented forNonNull<good_memory_allocator::chunks::FreeChunk>
shared static variables must have a type that implements
Sync
rustcoption.rs(563, 10): required because it appears within the type
Option<NonNull<FreeChunk>>
chunks.rs(750, 12): required because it appears within the type
FakeFreeChunk
lib.rs(113, 12): required because it appears within the type
Allocator<20, 8>
The text was updated successfully, but these errors were encountered: