memory_manager module
- class memory_manager.MemoryManager(enable_debug=True)
Bases:
object- cleanup_before_routine_change()
Clean up memory before changing routines.
- get_memory_info()
Get current memory information.
- Returns:
Memory information including free, allocated, and percentages
- Return type:
dict
- log_memory_status(context='')
Log current memory status with context.
- Parameters:
context – Context string for the memory report
- periodic_cleanup(force=False)
Perform periodic memory cleanup and monitoring.
- Parameters:
force – Force cleanup regardless of timing
- Returns:
True if cleanup was performed
- Return type:
bool
- set_debug(enabled)
Enable or disable memory debug output.