hpt-allocator 0.1.2

An internal library for memory allocator for hpt
Documentation
1
2
3
4
5
6
7
8
9
use std::{collections::HashMap, sync::Mutex};

use once_cell::sync::Lazy;

use super::CommonStorage;

/// This is a global variable that stores the allocated ptrs and their reference count for CPU devices
pub static CPU_STORAGE: Lazy<Mutex<HashMap<usize, CommonStorage>>> =
    Lazy::new(|| Mutex::new(HashMap::new()));