hpt_allocator/storage/cpu.rs
1use std::sync::Mutex;
2
3use hashbrown::HashMap;
4use once_cell::sync::Lazy;
5
6use super::CommonStorage;
7
8/// This is a global variable that stores the allocated ptrs and their reference count for CPU devices
9pub static CPU_STORAGE: Lazy<Mutex<HashMap<usize, CommonStorage>>> =
10 Lazy::new(|| Mutex::new(HashMap::new()));