File tree Expand file tree Collapse file tree 1 file changed +16
-7
lines changed Expand file tree Collapse file tree 1 file changed +16
-7
lines changed Original file line number Diff line number Diff line change 32
32
// / Debugging.
33
33
// / ---------------------------------------------------------------------------
34
34
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
+
35
51
// / NDEBUG (conditional exclusion).
36
52
#if defined(NDEBUG)
37
53
#define BC_ASSERT (expression )
44
60
#define BC_DEBUG_ONLY (expression ) expression
45
61
#endif
46
62
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
-
54
63
// / Messages.
55
64
// / ---------------------------------------------------------------------------
56
65
You can’t perform that action at this time.
0 commit comments