From cafcbde7529f7c1e4219344df9a404ecdb411aa5 Mon Sep 17 00:00:00 2001 From: 杨宇千 Date: Thu, 11 Jul 2019 00:43:27 +0800 Subject: ... --- src/win/CMakeLists.txt | 1 + src/win/heap_debug.cpp | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 src/win/heap_debug.cpp (limited to 'src/win') 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 + +namespace cru::platform { +void SetupHeapDebug() { + _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF); +} +} -- cgit v1.2.3