mirror of
https://github.com/bdwgc/bdwgc-rust.git
synced 2026-06-16 18:40:17 -06:00
Use std::alloc::alloc
This commit is contained in:
@@ -3,7 +3,7 @@ extern crate coroutine;
|
||||
|
||||
use bdwgc_alloc::Allocator;
|
||||
use coroutine::asymmetric::Coroutine;
|
||||
use std::alloc::{GlobalAlloc, Layout};
|
||||
use std::alloc::Layout;
|
||||
|
||||
#[global_allocator]
|
||||
static GLOBAL_ALLOCATOR: Allocator = Allocator;
|
||||
@@ -18,7 +18,7 @@ fn main() {
|
||||
Allocator::enable_gc();
|
||||
|
||||
loop {
|
||||
unsafe { GLOBAL_ALLOCATOR.alloc(Layout::from_size_align(2 ^ 8, 8).unwrap()) };
|
||||
unsafe { std::alloc::alloc(Layout::from_size_align(2 ^ 8, 8).unwrap()) };
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user