mirror of
https://github.com/bdwgc/bdwgc-rust.git
synced 2026-05-29 18:08:56 -06:00
Fix
This commit is contained in:
@@ -12,11 +12,13 @@ static GLOBAL_ALLOCATOR: Allocator = Allocator;
|
|||||||
fn main() {
|
fn main() {
|
||||||
unsafe { Allocator::initialize() }
|
unsafe { Allocator::initialize() }
|
||||||
|
|
||||||
let t1 = spawn(|| loop {
|
let t1 = spawn(|| {
|
||||||
unsafe { Allocator::register_current_thread().unwrap() }
|
unsafe { Allocator::register_current_thread().unwrap() }
|
||||||
|
|
||||||
let ptr = allocate();
|
loop {
|
||||||
unsafe { *ptr = 0 };
|
let ptr = allocate();
|
||||||
|
unsafe { *ptr = 0 };
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
let t2 = spawn(|| {
|
let t2 = spawn(|| {
|
||||||
|
|||||||
Reference in New Issue
Block a user