File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3232// / Debugging.
3333// / ---------------------------------------------------------------------------
3434
35+ // / Enables ETW tracing for VS memory profiler.
36+ #if defined(HAVE_MSC)
37+ #define ALLOCATOR __declspec (allocator)
38+ #else
39+ #define ALLOCATOR
40+ #endif
41+
42+ // / learn.microsoft.com/en-us/cpp/c-runtime-library/
43+ // / find-memory-leaks-using-the-crt-library
44+ // / _CRTDBG_MAP_ALLOC must be prior to the includes, so defined in props.
45+ #if defined(HAVE_MSC) && defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC)
46+ #include < stdlib.h>
47+ #include < crtdbg.h>
48+ // //_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
49+ #endif
50+
3551// / NDEBUG (conditional exclusion).
3652#if defined(NDEBUG)
3753 #define BC_ASSERT (expression )
4460 #define BC_DEBUG_ONLY (expression ) expression
4561#endif
4662
47- // / Enables ETW tracing for VS memory profiler.
48- #if defined(HAVE_MSC)
49- #define ALLOCATOR __declspec (allocator)
50- #else
51- #define ALLOCATOR
52- #endif
53-
5463// / Messages.
5564// / ---------------------------------------------------------------------------
5665
You can’t perform that action at this time.
0 commit comments