diff options
Diffstat (limited to 'src/win')
-rw-r--r-- | src/win/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/win/heap_debug.cpp | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/win/CMakeLists.txt b/src/win/CMakeLists.txt index 0076b3b2..d7d4ba96 100644 --- a/src/win/CMakeLists.txt +++ b/src/win/CMakeLists.txt @@ -3,6 +3,7 @@ set(CRU_WIN_BASE_INCLUDE_DIR ${CRU_INCLUDE_DIR}/cru/win/) add_library(cru_win_base STATIC debug.cpp exception.cpp + heap_debug.cpp string_util.cpp ) target_sources(cru_win_base PUBLIC diff --git a/src/win/heap_debug.cpp b/src/win/heap_debug.cpp new file mode 100644 index 00000000..33ebae7c --- /dev/null +++ b/src/win/heap_debug.cpp @@ -0,0 +1,11 @@ +#include "cru/win/win_pre_config.hpp" + +#include "cru/platform/heap_debug.hpp" + +#include <crtdbg.h> + +namespace cru::platform { +void SetupHeapDebug() { + _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF); +} +} |