bolar_2 backup

This commit is contained in:
2026-11-27 16:38:11 +08:00
commit e96d6d19df
305 changed files with 43350 additions and 0 deletions

19
main/ports/memory_cache.h Normal file
View File

@@ -0,0 +1,19 @@
#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