CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
hrydgard

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

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