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 crate::storage::CommonStorage;

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