forked from GitHub/bdwgc-rust
Refactor (#285)
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
name = "free_by_gc"
|
||||
version = "0.1.0"
|
||||
authors = ["Yota Toyama <raviqqe@gmail.com>"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
publish = false
|
||||
|
||||
[dependencies]
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
extern crate bdwgc_alloc;
|
||||
|
||||
use bdwgc_alloc::Allocator;
|
||||
use std::alloc::Layout;
|
||||
|
||||
@@ -10,6 +8,6 @@ fn main() {
|
||||
unsafe { Allocator::initialize() }
|
||||
|
||||
loop {
|
||||
unsafe { std::alloc::alloc(Layout::from_size_align(2 ^ 8, 8).unwrap()) };
|
||||
let _ = unsafe { std::alloc::alloc(Layout::from_size_align(2 ^ 8, 8).unwrap()) };
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user