Refactor examples

This commit is contained in:
Yota Toyama
2019-04-24 15:38:06 +00:00
parent 6b1380f4bb
commit 9a689d5c00
3 changed files with 3 additions and 10 deletions

View File

@@ -9,9 +9,7 @@ static GLOBAL_ALLOCATOR: Allocator = Allocator;
fn main() {
unsafe { Allocator::initialize() }
let mut _n = unsafe { GLOBAL_ALLOCATOR.alloc(Layout::from_size_align(2 ^ 8, 8).unwrap()) };
loop {
_n = unsafe { GLOBAL_ALLOCATOR.alloc(Layout::from_size_align(2 ^ 8, 8).unwrap()) };
unsafe { GLOBAL_ALLOCATOR.alloc(Layout::from_size_align(2 ^ 8, 8).unwrap()) };
}
}