Skip to main content

memscope_rs/core/
mod.rs

1//! Core memory tracking functionality
2//!
3//! This module contains the fundamental components for memory tracking:
4//! - Memory tracker implementation
5//! - Custom allocator
6//! - Type definitions
7//! - Scope tracking
8
9pub mod allocator;
10pub mod call_stack_normalizer;
11pub mod error;
12pub mod safe_operations;
13pub mod scope_tracker;
14pub mod tracker;
15pub mod types;
16
17// Re-export key types for easier access
18pub use allocator::TrackingAllocator;
19pub use tracker::{get_tracker, MemoryTracker};
20pub use types::{AllocationInfo, TrackingError, TrackingResult};
21
22pub use crate::capture::backends::{ExportMode, ExportOptions};
23
24pub use error::{
25    DefaultErrorRecovery, ErrorRecovery, ErrorSeverity, MemScopeError, MemoryOperation,
26    RecoveryAction, Result as MemScopeResult, SystemErrorType,
27};
28
29// Re-export call stack normalizer functionality
30pub use call_stack_normalizer::{
31    get_global_call_stack_normalizer, initialize_global_call_stack_normalizer, CallStackId,
32    CallStackNormalizer, CallStackRef, NormalizedCallStack, NormalizerConfig, NormalizerStats,
33};
34
35pub use safe_operations::SafeLock;