mirror of
https://github.com/bdwgc/bdwgc-rust.git
synced 2026-06-03 04:18:54 -06:00
Rename some examples
This commit is contained in:
16
examples/free_by_borrow/src/main.rs
Normal file
16
examples/free_by_borrow/src/main.rs
Normal file
@@ -0,0 +1,16 @@
|
||||
extern crate bdwgc_alloc;
|
||||
|
||||
use bdwgc_alloc::Allocator;
|
||||
|
||||
#[global_allocator]
|
||||
static GLOBAL_ALLOCATOR: Allocator = Allocator;
|
||||
|
||||
fn main() {
|
||||
unsafe { Allocator::initialize() }
|
||||
|
||||
let mut _n: Box<[u8; 2 ^ 8]> = Box::new([0; 2 ^ 8]);
|
||||
|
||||
loop {
|
||||
_n = Box::new([0; 2 ^ 8]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user