bolar_2 backup
This commit is contained in:
19
main/ports/memory_cache.h
Normal file
19
main/ports/memory_cache.h
Normal 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
|
||||
Reference in New Issue
Block a user