Rename some examples

This commit is contained in:
Yota Toyama
2019-04-30 15:21:42 +00:00
parent 3847afbc60
commit ac9bb2ec16
10 changed files with 208 additions and 80 deletions

View File

@@ -0,0 +1,15 @@
extern crate bdwgc_alloc;
use bdwgc_alloc::Allocator;
use std::alloc::{GlobalAlloc, Layout};
#[global_allocator]
static GLOBAL_ALLOCATOR: Allocator = Allocator;
fn main() {
unsafe { Allocator::initialize() }
loop {
unsafe { GLOBAL_ALLOCATOR.alloc(Layout::from_size_align(2 ^ 8, 8).unwrap()) };
}
}