Raxol.Terminal.MemoryManager (Raxol v2.0.1)
View SourceManages memory usage and limits for the terminal emulator.
Summary
Functions
Checks and cleans up memory if needed.
Returns a specification to start this module under a supervisor.
Estimates memory usage for the given state. Returns the estimated memory usage in bytes.
Gets the memory limit.
Gets the current memory usage.
Gets the current memory usage (alias for get_memory_usage).
Callback implementation for Raxol.Core.Behaviours.BaseManager.handle_manager_cast/2.
Callback implementation for Raxol.Core.Behaviours.BaseManager.handle_manager_info/2.
Checks if scrolling is needed based on memory usage.
Updates memory usage for the given state.
Checks if the current memory usage is within limits.
Types
@type t() :: %Raxol.Terminal.MemoryManager{ current_memory: non_neg_integer(), max_memory: non_neg_integer(), memory_limit: non_neg_integer() }
Functions
Checks and cleans up memory if needed.
Returns a specification to start this module under a supervisor.
See Supervisor.
Estimates memory usage for the given state. Returns the estimated memory usage in bytes.
Gets the memory limit.
Gets the current memory usage.
Gets the current memory usage (alias for get_memory_usage).
Callback implementation for Raxol.Core.Behaviours.BaseManager.handle_manager_cast/2.
Callback implementation for Raxol.Core.Behaviours.BaseManager.handle_manager_info/2.
Checks if scrolling is needed based on memory usage.
Updates memory usage for the given state.
Checks if the current memory usage is within limits.