From a318362d254ea9fa3f8e431f6f82d7b2a2f2f3ed Mon Sep 17 00:00:00 2001 From: Yota Toyama Date: Thu, 28 Sep 2023 12:26:49 +1000 Subject: [PATCH] Remove tagged pointer example --- examples/Cargo.toml | 1 - examples/tagged_pointer/Cargo.toml | 9 --------- examples/tagged_pointer/src/main.rs | 21 --------------------- 3 files changed, 31 deletions(-) delete mode 100644 examples/tagged_pointer/Cargo.toml delete mode 100644 examples/tagged_pointer/src/main.rs diff --git a/examples/Cargo.toml b/examples/Cargo.toml index 34e04c6..8454b9c 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -5,5 +5,4 @@ members = [ "free_by_borrow", "free_by_gc", "static_threads", - "tagged_pointer", ] diff --git a/examples/tagged_pointer/Cargo.toml b/examples/tagged_pointer/Cargo.toml deleted file mode 100644 index 9257097..0000000 --- a/examples/tagged_pointer/Cargo.toml +++ /dev/null @@ -1,9 +0,0 @@ -[package] -name = "tagged_pointer" -version = "0.1.0" -authors = ["Yota Toyama "] -edition = "2021" -publish = false - -[dependencies] -bdwgc-alloc = { path = "../.." } diff --git a/examples/tagged_pointer/src/main.rs b/examples/tagged_pointer/src/main.rs deleted file mode 100644 index 600bcc6..0000000 --- a/examples/tagged_pointer/src/main.rs +++ /dev/null @@ -1,21 +0,0 @@ -extern crate bdwgc_alloc; - -use bdwgc_alloc::Allocator; -use std::alloc::Layout; - -#[global_allocator] -static GLOBAL_ALLOCATOR: Allocator = Allocator; - -fn main() { - unsafe { Allocator::initialize() } - - let handle = std::thread::spawn(move || { - unsafe { Allocator::register_current_thread().unwrap() } - - loop { - let _ = unsafe { std::alloc::alloc(Layout::from_size_align(2 ^ 8, 8).unwrap()) }; - } - }); - - handle.join().unwrap(); -}