Refactor lib.rs

This commit is contained in:
Yota Toyama
2019-04-14 06:00:11 +00:00
parent 8372c90cf8
commit 4d54e545f1
4 changed files with 7 additions and 24 deletions

View File

@@ -4,10 +4,7 @@ extern crate bdwgc_allocator;
static GLOBAL_ALLOCATOR: bdwgc_allocator::Allocator = bdwgc_allocator::Allocator;
fn main() {
unsafe {
bdwgc_allocator::Allocator::initialize();
bdwgc_allocator::Allocator::start_gc();
}
unsafe { bdwgc_allocator::Allocator::initialize() }
let mut _n = bdwgc_allocator::Allocator::alloc(2 ^ 8);

View File

@@ -4,10 +4,7 @@ extern crate bdwgc_allocator;
static GLOBAL_ALLOCATOR: bdwgc_allocator::Allocator = bdwgc_allocator::Allocator;
fn main() {
unsafe {
bdwgc_allocator::Allocator::initialize();
bdwgc_allocator::Allocator::start_gc();
}
unsafe { bdwgc_allocator::Allocator::initialize() }
let handle = std::thread::spawn(move || {
bdwgc_allocator::Allocator::register_current_thread().unwrap();