Expand description
Advanced-optimized memory pool system for spatial algorithms
This module provides advanced memory management strategies specifically designed for spatial computing algorithms that perform frequent allocations. The system includes object pools, arena allocators, and cache-aware memory layouts to maximize performance.
§Features
- Object pools: Reusable pools for frequently allocated types
- Arena allocators: Block-based allocation for temporary objects
- Cache-aware layouts: Memory alignment for optimal cache performance
- NUMA-aware allocation: Memory placement for multi-socket systems
- Zero-copy operations: Minimize data movement and copying
§Examples
use scirs2_spatial::memory_pool::{DistancePool, ClusteringArena};
// Create a distance computation pool
let mut pool = DistancePool::new(1000);
// Get a reusable distance buffer
let buffer = pool.get_distance_buffer(256);
// Use buffer for computations...
// Buffer is automatically returned to pool when dropped (RAII)Structs§
- Arena
Statistics - Arena performance statistics
- Arena
Vec - RAII wrapper for arena-allocated vectors
- Clustering
Arena - Arena allocator for temporary objects in clustering algorithms
- Distance
Buffer - RAII wrapper for distance buffers with automatic return to pool
- Distance
Pool - Advanced-optimized distance computation memory pool
- Index
Buffer - RAII wrapper for index buffers
- Matrix
Buffer - RAII wrapper for matrix buffers
- Memory
Pool Config - Configuration for memory pool system
- Numa
Capabilities - NUMA system capabilities
- Numa
Node - Individual NUMA node information
- Numa
Topology - NUMA topology information for memory allocation optimization
- Pool
Info - Detailed pool information
- Pool
Statistics - Pool performance statistics
Functions§
- create_
numa_ optimized_ pool - Create a NUMA-optimized distance pool for the current thread
- get_
numa_ topology - Get NUMA topology information
- global_
clustering_ arena - Get the global clustering arena instance
- global_
distance_ pool - Get the global distance pool instance
- test_
numa_ capabilities - Test NUMA capabilities and return detailed information