hpt_allocator/storage/
cpu.rs

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