mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-11 01:25:07 +02:00
28 lines
571 B
C
28 lines
571 B
C
#pragma once
|
|
|
|
#ifdef _WIN32
|
|
|
|
#include <winapifamily.h>
|
|
|
|
// Utility file for using the MS CRT's memory tracking.
|
|
// crtdbg.h overloads malloc with malloc_dbg etc, but does not catch new. So here we go.
|
|
|
|
// To add a full check of memory overruns, throw in a _CrtCheckMemory(). Useful to narrow things down.
|
|
|
|
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
|
|
|
|
#include <crtdbg.h>
|
|
|
|
#if defined(_DEBUG)
|
|
#define USE_CRT_DBG
|
|
#ifndef DBG_NEW
|
|
#define DBG_NEW new ( _NORMAL_BLOCK , __FILE__ , __LINE__ )
|
|
#define new DBG_NEW
|
|
#endif
|
|
|
|
#endif // _DEBUG
|
|
|
|
#endif
|
|
|
|
#endif // _WIN32
|