class Async::Container::Supervisor::MemoryMonitor

def initialize(interval: 10, total_size_limit: nil, **options)

@parameter options [Hash] Options to pass to the cluster when adding processes.
@parameter total_size_limit [Integer] The total size limit of all processes, or nil for no limit.
@parameter interval [Integer] The interval at which to check for memory leaks.

Create a new memory monitor.
def initialize(interval: 10, total_size_limit: nil, **options)
	@interval = interval
	@cluster = Memory::Leak::Cluster.new(total_size_limit: total_size_limit)
	
	# We use these options when adding processes to the cluster:
	@options = options
	
	@processes = Hash.new{|hash, key| hash[key] = Set.new.compare_by_identity}
end