Expand description
Core memory tracking functionality Core memory tracking functionality
This module contains the fundamental components for memory tracking:
- Memory tracker implementation
- Custom allocator
- Type definitions
- Scope tracking
Re-exports§
pub use allocator::TrackingAllocator;
pub use tracker::get_tracker;
pub use tracker::MemoryTracker;
pub use types::AllocationInfo;
pub use types::TrackingError;
pub use types::TrackingResult;
pub use error::DefaultErrorRecovery;
pub use error::ErrorRecovery;
pub use error::ErrorSeverity;
pub use error::MemScopeError;
pub use error::MemoryOperation;
pub use error::RecoveryAction;
pub use error::Result as MemScopeResult;
pub use error::SystemErrorType;
pub use error_adapter::adapt_result;
pub use error_adapter::from_tracking_error;
pub use error_adapter::to_tracking_error;
pub use error_adapter::to_tracking_result;
pub use error_adapter::DefaultErrorAdapter;
pub use error_adapter::ErrorAdapter;
pub use unwrap_safe::get_unwrap_stats;
pub use unwrap_safe::update_unwrap_stats;
pub use unwrap_safe::UnwrapSafe;
pub use unwrap_safe::UnwrapStats;
pub use string_pool::get_string_pool_stats;
pub use string_pool::intern_string;
pub use string_pool::StringPoolStats;
pub use string_pool_monitor::get_string_pool_monitor_stats;
pub use string_pool_monitor::MemoryEfficiencyMetrics;
pub use string_pool_monitor::OptimizationRecommendation;
pub use string_pool_monitor::PerformanceMetrics;
pub use string_pool_monitor::StringPoolMonitorStats;
pub use string_pool_monitor::UsagePatterns;
pub use optimized_types::OptimizedAllocationInfo;
pub use atomic_stats::AtomicMemoryStats;
pub use atomic_stats::AtomicPerformanceCounters;
pub use atomic_stats::MemoryStatsSnapshot;
pub use atomic_stats::PerformanceSnapshot;
pub use atomic_stats::SimpleMemoryStats;
pub use optimized_locks::LockFreeCounter;
pub use optimized_locks::OptimizedMutex;
pub use optimized_locks::OptimizedRwLock;
pub use sharded_locks::ShardStats;
pub use sharded_locks::ShardedMutex;
pub use sharded_locks::ShardedRwLock;
pub use adaptive_hashmap::AdaptiveHashMap;
pub use simple_mutex::SimpleMutex;
pub use smart_optimization::SmartClone;
pub use smart_optimization::SmartMutex;
pub use smart_optimization::SmartStats;
pub use targeted_optimizations::efficient_string_concat;
pub use targeted_optimizations::BatchProcessor;
pub use targeted_optimizations::FastStatsCollector;
pub use threshold_batch_processor::BatchConfig;
pub use threshold_batch_processor::ProcessingStats;
pub use threshold_batch_processor::ThresholdBatchProcessor;
pub use allocation_adapter::AllocationCollection;
pub use allocation_adapter::AllocationInfoAdapter;
pub use allocation_adapter::CollectionMemoryStats;
pub use clone_monitor::get_clone_stats;
pub use clone_monitor::get_optimization_recommendations;
pub use clone_monitor::CloneMonitorStats;
pub use clone_optimizer::CloneInfo;
pub use clone_optimizer::CloneOptimizer;
pub use clone_optimizer::CloneStats;
pub use clone_utils::optimized_clone;
pub use optimized_tracker::OptimizedMemoryTracker;
pub use bounded_memory_stats::AllocationHistoryManager;
pub use bounded_memory_stats::AllocationSummary;
pub use bounded_memory_stats::BoundedMemoryStats;
pub use bounded_memory_stats::BoundedStatsConfig;
pub use bounded_memory_stats::HistoricalSummary;
pub use bounded_memory_stats::MemoryUsageStats;
pub use enhanced_pointer_extractor::EnhancedPointerExtractor;
pub use enhanced_pointer_extractor::EnhancedTrackable;
pub use enhanced_pointer_extractor::PointerInfo;
pub use enhanced_pointer_extractor::PointerStatistics;
pub use enhanced_pointer_extractor::SyntheticReason;
pub use enhanced_pointer_extractor::TypeCategory;
pub use enhanced_pointer_extractor::TypeInfo;
pub use enhanced_type_inference::AllocationContext;
pub use enhanced_type_inference::InferenceMethod;
pub use enhanced_type_inference::InferenceStatistics;
pub use enhanced_type_inference::InferredType;
pub use enhanced_type_inference::TypeConfidence;
pub use enhanced_type_inference::TypeInferenceEngine;
pub use enhanced_type_inference::TypeSignature;
pub use tracker::configure_tracking_strategy;
pub use crate::unified::detect_environment;
pub use crate::unified::detect_environment_detailed;
pub use crate::unified::quick_start as unified_quick_start;
pub use crate::unified::test_unified_system;
pub use crate::unified::AsyncRuntimeType;
pub use crate::unified::BackendConfig;
pub use crate::unified::BackendError;
pub use crate::unified::DetectionConfig;
pub use crate::unified::DetectionMetadata;
pub use crate::unified::DetectionMethod;
pub use crate::unified::DispatcherConfig;
pub use crate::unified::DispatcherMetrics;
pub use crate::unified::EnvironmentAnalysis;
pub use crate::unified::EnvironmentDetector;
pub use crate::unified::MemoryAnalysisData;
pub use crate::unified::MemoryStatistics;
pub use crate::unified::MemoryTracker as UnifiedMemoryTracker;
pub use crate::unified::RuntimeEnvironment;
pub use crate::unified::SessionMetadata;
pub use crate::unified::TrackerConfig;
pub use crate::unified::TrackerError;
pub use crate::unified::TrackerStatistics;
pub use crate::unified::TrackerType;
pub use crate::unified::TrackingDispatcher;
pub use crate::unified::TrackingOperation;
pub use crate::unified::TrackingSession;
pub use crate::unified::TrackingStrategy;
pub use crate::unified::UnifiedBackend;
pub use ownership_history::ActiveBorrow;
pub use ownership_history::BorrowInfo;
pub use ownership_history::BorrowType;
pub use ownership_history::CloneInfo as OwnershipCloneInfo;
pub use ownership_history::HistoryConfig;
pub use ownership_history::OwnershipEvent;
pub use ownership_history::OwnershipEventDetails;
pub use ownership_history::OwnershipEventType;
pub use ownership_history::OwnershipHistoryExport;
pub use ownership_history::OwnershipHistoryRecorder;
pub use ownership_history::OwnershipStatistics;
pub use ownership_history::OwnershipSummary;
pub use ownership_history::RefCountInfo;
pub use lifecycle_summary::AllocationLifecycleSummary;
pub use lifecycle_summary::ExportMetadata;
pub use lifecycle_summary::LifecycleEvent;
pub use lifecycle_summary::LifecycleEventSummary;
pub use lifecycle_summary::LifecycleExportData;
pub use lifecycle_summary::LifecyclePattern;
pub use lifecycle_summary::LifecycleSummaryGenerator;
pub use lifecycle_summary::SummaryConfig;
pub use lifecycle_summary::VariableGroup;
pub use call_stack_normalizer::get_global_call_stack_normalizer;
pub use call_stack_normalizer::initialize_global_call_stack_normalizer;
pub use call_stack_normalizer::CallStackId;
pub use call_stack_normalizer::CallStackNormalizer;
pub use call_stack_normalizer::CallStackRef;
pub use call_stack_normalizer::NormalizedCallStack;
pub use call_stack_normalizer::NormalizerConfig;
pub use call_stack_normalizer::NormalizerStats;
Modules§
- adaptive_
hashmap - Adaptive HashMap that switches between simple and sharded modes based on contention
- allocation_
adapter - Compatibility adapter for AllocationInfo migration
- allocator
- Custom global allocator for tracking memory allocations.
- atomic_
stats - Atomic statistics system for lock-free performance monitoring
- bounded_
memory_ stats - Bounded memory statistics to prevent infinite growth
- call_
stack_ normalizer - Call Stack Normalization System
- clone_
monitor - Clone operation monitoring and optimization tracking
- clone_
optimizer - Clone optimization system for reducing unnecessary clone() calls
- clone_
utils - Utilities for optimizing clone operations
- comprehensive_
data_ deduplicator - Comprehensive Data Deduplication System
- edge_
case_ handler - Edge Case Handler - Comprehensive edge case and error handling
- enhanced_
call_ stack_ normalizer - Enhanced Call Stack Normalization System
- enhanced_
pointer_ extractor - Enhanced pointer extraction with real pointer prioritization
- enhanced_
type_ inference - Enhanced type inference engine
- error
- Unified error handling system for memscope-rs
- error_
adapter - Error adapter for backward compatibility
- fast_
data_ deduplicator - Simple Data Deduplicator - High Performance Version
- integration_
validator - Integration Validator - Validates all enhanced components work together
- lifecycle_
summary - Lifecycle summary generation for enhanced memory analysis
- optimized_
locks - Optimized lock implementations using parking_lot
- optimized_
tracker - Optimized memory tracker using Arc sharing to reduce clone overhead
- optimized_
types - Optimized data structures using string interning and Arc sharing
- ownership_
history - Ownership history tracking system
- safe_
operations - Safe Operations - Provides safe lock operations
- scope_
tracker - Scope tracking functionality for memory analysis
- sharded_
locks - Sharded lock system for reducing lock contention
- shared_
types - Arc-shared data structures for reducing clone overhead
- simple_
mutex - Simple mutex implementation with compile-time optimization selection
- smart_
optimization - Smart optimization based on actual performance analysis
- string_
pool - Global string pool system for memory optimization
- string_
pool_ monitor - String pool monitoring and statistics
- targeted_
optimizations - Targeted optimizations for actual performance bottlenecks
- test_
optimized_ locks - Tests for optimized lock implementations
- thread_
registry - Thread registry for managing thread-local memory trackers and data aggregation.
- threshold_
batch_ processor - Threshold-based batch processor that adapts based on operation frequency
- tracker
- Memory tracking module with modular structure.
- types
- Type definitions
- unwrap_
safe - Safe unwrap utilities for memscope-rs