mirror of
https://github.com/bdwgc/bdwgc-rust.git
synced 2026-05-31 10:58:55 -06:00
Refactor lib.rs
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user