Get the global memory monitor instance
()
| 402 | |
| 403 | /// Get the global memory monitor instance |
| 404 | pub fn global_memory_monitor() -> &'static MemoryMonitor { |
| 405 | GLOBAL_MEMORY_MONITOR.get_or_init(|| { |
| 406 | let config = MemoryMonitorConfig::from_env(); |
| 407 | MemoryMonitor::with_config(config) |
| 408 | }) |
| 409 | } |
| 410 | |
| 411 | /// Record buffer allocation in the global monitor |
| 412 | pub fn record_buffer_allocation(bytes: u64) { |
no outgoing calls