This commit is contained in:
Ilusha 2024-03-15 23:42:10 +03:00 committed by Ilya Shurupov
parent b8bcf58a29
commit afab59eb21
34 changed files with 288 additions and 264 deletions

View file

@ -1,6 +1,6 @@
#pragma once
#include "Module.hpp"
#include "Callstack.hpp"
#include <mutex>
namespace tp {
@ -12,6 +12,9 @@ namespace tp {
static struct MemHead* mEntry;
static std::mutex mMutex;
static bool mIgnore;
#ifdef MEM_STACK_TRACE // Save stack on allocation call
static CallStackCapture mCallstack;
#endif
#endif
public:

View file

@ -6,5 +6,4 @@
#define MEM_CLEAR_ON_DEALLOC // Clear data on free
#define MEM_CLEAR_ON_DEALLOC_VAL 0xAA // Clear data on free
#define MEM_CLEAR_ON_ALLOC_VAL 0xCC // Clear data on free
#define MEM_STACK_TRACE // Save stack on allocation call
#define MEM_STACK_TRACE_MAX_DEPTH 32 // Call stack max depth