Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
hrydgard
GitHub Repository: hrydgard/ppsspp
Path: blob/master/Common/DbgNew.h
3185 views
1
#pragma once
2
3
#include <winapifamily.h>
4
5
// Utility file for using the MS CRT's memory tracking.
6
// crtdbg.h overloads malloc with malloc_dbg etc, but does not catch new. So here we go.
7
8
// To add a full check of memory overruns, throw in a _CrtCheckMemory(). Useful to narrow things down.
9
10
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
11
12
#include <crtdbg.h>
13
14
#if defined(_DEBUG)
15
#define USE_CRT_DBG
16
#ifndef DBG_NEW
17
#define DBG_NEW new ( _NORMAL_BLOCK , __FILE__ , __LINE__ )
18
#define new DBG_NEW
19
#endif
20
21
#endif // _DEBUG
22
23
#endif
24
25