Files
c-toxcore/testing/support/public/memory.hh
T
iphydf 9c22e79cc8 test(support): add SimulatedEnvironment for deterministic testing
Introduces a new testing support library 'testing/support' that provides
a clean, modular, and fully deterministic environment for testing
toxcore components.
2026-01-07 13:06:18 +00:00

24 lines
499 B
C++

#ifndef C_TOXCORE_TESTING_SUPPORT_PUBLIC_MEMORY_H
#define C_TOXCORE_TESTING_SUPPORT_PUBLIC_MEMORY_H
#include <cstddef>
#include <cstdint>
namespace tox::test {
/**
* @brief Abstraction over the memory allocator.
*/
class MemorySystem {
public:
virtual ~MemorySystem();
virtual void *malloc(size_t size) = 0;
virtual void *realloc(void *ptr, size_t size) = 0;
virtual void free(void *ptr) = 0;
};
} // namespace tox::test
#endif // C_TOXCORE_TESTING_SUPPORT_PUBLIC_MEMORY_H