| Crates.io | bitcoin-locked-pool |
| lib.rs | bitcoin-locked-pool |
| version | 0.1.2 |
| created_at | 2025-07-09 01:36:17.496527+00 |
| updated_at | 2025-07-09 08:33:15.913445+00 |
| description | A memory pool for locked memory chunks to securely handle sensitive data, preventing it from being swapped to disk. |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1743875 |
| size | 107,877 |
The bitcoin-locked-pool crate provides a memory pool for locked memory chunks, designed to prevent sensitive key data from being swapped to disk. This allows developers to manage memory effectively for cryptographic or sensitive applications where data protection is critical. The pool grows dynamically, managing separate arenas for its administrative tasks, and optimizes locked memory usage, a scarce resource in many operating systems.
LockedPool: Manages memory allocation and deallocation. Ensures arenas are created and tracked effectively.LockedPoolManager: Singleton class that manages a global instance of locked pools, ensuring proper initialization order.LockedPageArena: Represents a single arena of locked pages, handling memory allocation and free operations.LockedPoolStats: Provides statistics on memory usage within the pool, aiding in resource management.use bitcoin_locked_pool::{LockedPool, LockedPoolManager};
let pool_manager = LockedPoolManager::instance();
let mut pool = pool_manager.lock();
// Allocate locked memory
let ptr = pool.alloc(1024);
// Free locked memory
pool.free(ptr);
Add the following to your Cargo.toml:
[dependencies]
bitcoin-locked-pool = "0.1.1"
MIT License. See LICENSE file for details.
This README was generated by an AI model and may not be 100% accurate; however, it should be pretty good.