#pragma once #include "memory/memory_types.h" namespace borla { class IMemoryCache { public: virtual ~IMemoryCache() = default; virtual bool Load() = 0; // Deliberately an out-parameter rather than a by-value return: a returned // MemorySnapshot materialises a ~2 KB temporary in the caller's frame, and // the only caller is the WebSocket/TLS task building ClientHello, whose // stack cannot absorb that on top of the message buffer. virtual void CopySnapshot(MemorySnapshot* output) const = 0; virtual bool Update(const MemorySnapshot& snapshot) = 0; }; } // namespace borla