| 1 |
/** |
| 2 |
* This file has no copyright assigned and is placed in the Public Domain. |
| 3 |
* This file is part of the mingw-w64 runtime package. |
| 4 |
* No warranty is given; refer to the file DISCLAIMER.PD within this package. |
| 5 |
*/ |
| 6 |
#include <crtdefs.h> |
| 7 |
#include <sal.h> |
| 8 |
|
| 9 |
#ifndef _INC_CRTDBG |
| 10 |
#define _INC_CRTDBG |
| 11 |
|
| 12 |
#pragma pack(push,_CRT_PACKING) |
| 13 |
|
| 14 |
#ifndef NULL |
| 15 |
#ifdef __cplusplus |
| 16 |
#ifndef _WIN64 |
| 17 |
#define NULL 0 |
| 18 |
#else |
| 19 |
#define NULL 0LL |
| 20 |
#endif /* W64 */ |
| 21 |
#else |
| 22 |
#define NULL ((void *)0) |
| 23 |
#endif |
| 24 |
#endif |
| 25 |
|
| 26 |
#ifdef __cplusplus |
| 27 |
extern "C" { |
| 28 |
#endif |
| 29 |
|
| 30 |
typedef void *_HFILE; |
| 31 |
|
| 32 |
#define _CRT_WARN 0 |
| 33 |
#define _CRT_ERROR 1 |
| 34 |
#define _CRT_ASSERT 2 |
| 35 |
#define _CRT_ERRCNT 3 |
| 36 |
|
| 37 |
#define _CRTDBG_MODE_FILE 0x1 |
| 38 |
#define _CRTDBG_MODE_DEBUG 0x2 |
| 39 |
#define _CRTDBG_MODE_WNDW 0x4 |
| 40 |
#define _CRTDBG_REPORT_MODE -1 |
| 41 |
|
| 42 |
#define _CRTDBG_INVALID_HFILE ((_HFILE)-1) |
| 43 |
#define _CRTDBG_HFILE_ERROR ((_HFILE)-2) |
| 44 |
#define _CRTDBG_FILE_STDOUT ((_HFILE)-4) |
| 45 |
#define _CRTDBG_FILE_STDERR ((_HFILE)-5) |
| 46 |
#define _CRTDBG_REPORT_FILE ((_HFILE)-6) |
| 47 |
|
| 48 |
typedef int (__cdecl *_CRT_REPORT_HOOK)(int,char *,int *); |
| 49 |
typedef int (__cdecl *_CRT_REPORT_HOOKW)(int,wchar_t *,int *); |
| 50 |
|
| 51 |
#define _CRT_RPTHOOK_INSTALL 0 |
| 52 |
#define _CRT_RPTHOOK_REMOVE 1 |
| 53 |
|
| 54 |
#define _HOOK_ALLOC 1 |
| 55 |
#define _HOOK_REALLOC 2 |
| 56 |
#define _HOOK_FREE 3 |
| 57 |
|
| 58 |
typedef int (__cdecl *_CRT_ALLOC_HOOK)(int,void *,size_t,int,long,const unsigned char *,int); |
| 59 |
|
| 60 |
#define _CRTDBG_ALLOC_MEM_DF 0x01 |
| 61 |
#define _CRTDBG_DELAY_FREE_MEM_DF 0x02 |
| 62 |
#define _CRTDBG_CHECK_ALWAYS_DF 0x04 |
| 63 |
#define _CRTDBG_RESERVED_DF 0x08 |
| 64 |
#define _CRTDBG_CHECK_CRT_DF 0x10 |
| 65 |
#define _CRTDBG_LEAK_CHECK_DF 0x20 |
| 66 |
|
| 67 |
#define _CRTDBG_CHECK_EVERY_16_DF 0x00100000 |
| 68 |
#define _CRTDBG_CHECK_EVERY_128_DF 0x00800000 |
| 69 |
#define _CRTDBG_CHECK_EVERY_1024_DF 0x04000000 |
| 70 |
|
| 71 |
#define _CRTDBG_CHECK_DEFAULT_DF 0 |
| 72 |
|
| 73 |
#define _CRTDBG_REPORT_FLAG -1 |
| 74 |
|
| 75 |
#define _BLOCK_TYPE(block) (block & 0xFFFF) |
| 76 |
#define _BLOCK_SUBTYPE(block) (block >> 16 & 0xFFFF) |
| 77 |
|
| 78 |
#define _FREE_BLOCK 0 |
| 79 |
#define _NORMAL_BLOCK 1 |
| 80 |
#define _CRT_BLOCK 2 |
| 81 |
#define _IGNORE_BLOCK 3 |
| 82 |
#define _CLIENT_BLOCK 4 |
| 83 |
#define _MAX_BLOCKS 5 |
| 84 |
|
| 85 |
typedef void (__cdecl *_CRT_DUMP_CLIENT)(void *,size_t); |
| 86 |
|
| 87 |
struct _CrtMemBlockHeader; |
| 88 |
|
| 89 |
typedef struct _CrtMemState { |
| 90 |
struct _CrtMemBlockHeader *pBlockHeader; |
| 91 |
size_t lCounts[_MAX_BLOCKS]; |
| 92 |
size_t lSizes[_MAX_BLOCKS]; |
| 93 |
size_t lHighWaterCount; |
| 94 |
size_t lTotalCount; |
| 95 |
} _CrtMemState; |
| 96 |
|
| 97 |
#ifndef _STATIC_ASSERT |
| 98 |
#if (defined(__cpp_static_assert) && __cpp_static_assert >= 201411L) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L) |
| 99 |
#define _STATIC_ASSERT(expr) static_assert(expr) |
| 100 |
#elif defined(__cpp_static_assert) |
| 101 |
#define _STATIC_ASSERT(expr) static_assert(expr, #expr) |
| 102 |
#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L |
| 103 |
#define _STATIC_ASSERT(expr) _Static_assert(expr, #expr) |
| 104 |
#elif defined(_MSC_VER) |
| 105 |
#define _STATIC_ASSERT(expr) typedef char __static_assert_t[(expr)] |
| 106 |
#else |
| 107 |
#define _STATIC_ASSERT(expr) extern void __static_assert_t(int [(expr)?1:-1]) |
| 108 |
#endif |
| 109 |
#endif |
| 110 |
|
| 111 |
#ifndef _DEBUG |
| 112 |
|
| 113 |
#ifndef _ASSERT |
| 114 |
#define _ASSERT(expr) ((void)0) |
| 115 |
#endif |
| 116 |
|
| 117 |
#ifndef _ASSERTE |
| 118 |
#define _ASSERTE(expr) ((void)0) |
| 119 |
#endif |
| 120 |
|
| 121 |
#ifndef _ASSERT_EXPR |
| 122 |
#define _ASSERT_EXPR(expr,expr_str) ((void)0) |
| 123 |
#endif |
| 124 |
|
| 125 |
#ifndef _ASSERT_BASE |
| 126 |
#define _ASSERT_BASE _ASSERT_EXPR |
| 127 |
#endif |
| 128 |
|
| 129 |
#define _RPT0(rptno,msg) |
| 130 |
#define _RPTW0(rptno,msg) |
| 131 |
|
| 132 |
#define _RPT1(rptno,msg,arg1) |
| 133 |
#define _RPTW1(rptno,msg,arg1) |
| 134 |
#define _RPT2(rptno,msg,arg1,arg2) |
| 135 |
#define _RPTW2(rptno,msg,arg1,arg2) |
| 136 |
#define _RPT3(rptno,msg,arg1,arg2,arg3) |
| 137 |
#define _RPTW3(rptno,msg,arg1,arg2,arg3) |
| 138 |
#define _RPT4(rptno,msg,arg1,arg2,arg3,arg4) |
| 139 |
#define _RPTW4(rptno,msg,arg1,arg2,arg3,arg4) |
| 140 |
#define _RPTF0(rptno,msg) |
| 141 |
#define _RPTFW0(rptno,msg) |
| 142 |
#define _RPTF1(rptno,msg,arg1) |
| 143 |
#define _RPTFW1(rptno,msg,arg1) |
| 144 |
#define _RPTF2(rptno,msg,arg1,arg2) |
| 145 |
#define _RPTFW2(rptno,msg,arg1,arg2) |
| 146 |
#define _RPTF3(rptno,msg,arg1,arg2,arg3) |
| 147 |
#define _RPTFW3(rptno,msg,arg1,arg2,arg3) |
| 148 |
#define _RPTF4(rptno,msg,arg1,arg2,arg3,arg4) |
| 149 |
#define _RPTFW4(rptno,msg,arg1,arg2,arg3,arg4) |
| 150 |
|
| 151 |
#define _malloc_dbg(s,t,f,l) malloc(s) |
| 152 |
#define _calloc_dbg(c,s,t,f,l) calloc(c,s) |
| 153 |
#define _realloc_dbg(p,s,t,f,l) realloc(p,s) |
| 154 |
#define _expand_dbg(p,s,t,f,l) _expand(p,s) |
| 155 |
#define _free_dbg(p,t) free(p) |
| 156 |
#define _msize_dbg(p,t) _msize(p) |
| 157 |
|
| 158 |
#define _aligned_malloc_dbg(s,a,f,l) _aligned_malloc(s,a) |
| 159 |
#define _aligned_realloc_dbg(p,s,a,f,l) _aligned_realloc(p,s,a) |
| 160 |
#define _aligned_free_dbg(p) _aligned_free(p) |
| 161 |
#define _aligned_offset_malloc_dbg(s,a,o,f,l) _aligned_offset_malloc(s,a,o) |
| 162 |
#define _aligned_offset_realloc_dbg(p,s,a,o,f,l) _aligned_offset_realloc(p,s,a,o) |
| 163 |
|
| 164 |
#define _recalloc_dbg(p,c,s,t,f,l) _recalloc(p,c,s) |
| 165 |
#define _aligned_recalloc_dbg(p,c,s,a,f,l) _aligned_realloc(p,c,s,a) |
| 166 |
#define _aligned_offset_recalloc_dbg(p,c,s,a,o,f,l) _aligned_offset_recalloc(p,c,s,a,o) |
| 167 |
#define _aligned_msize_dbg(p,a,o) _aligned_msize(p,a,o) |
| 168 |
|
| 169 |
#define _malloca_dbg(s,t,f,l) _malloca(s) |
| 170 |
#define _freea_dbg(p,t) _freea(p) |
| 171 |
|
| 172 |
#define _strdup_dbg(s,t,f,l) _strdup(s) |
| 173 |
#define _wcsdup_dbg(s,t,f,l) _wcsdup(s) |
| 174 |
#define _mbsdup_dbg(s,t,f,l) _mbsdup(s) |
| 175 |
#define _tempnam_dbg(s1,s2,t,f,l) _tempnam(s1,s2) |
| 176 |
#define _wtempnam_dbg(s1,s2,t,f,l) _wtempnam(s1,s2) |
| 177 |
#define _fullpath_dbg(s1,s2,le,t,f,l) _fullpath(s1,s2,le) |
| 178 |
#define _wfullpath_dbg(s1,s2,le,t,f,l) _wfullpath(s1,s2,le) |
| 179 |
#define _getcwd_dbg(s,le,t,f,l) _getcwd(s,le) |
| 180 |
#define _wgetcwd_dbg(s,le,t,f,l) _wgetcwd(s,le) |
| 181 |
#define _getdcwd_dbg(d,s,le,t,f,l) _getdcwd(d,s,le) |
| 182 |
#define _wgetdcwd_dbg(d,s,le,t,f,l) _wgetdcwd(d,s,le) |
| 183 |
#if __MSVCRT_VERSION__ >= 0x800 |
| 184 |
#define _getdcwd_lk_dbg(d,s,le,t,f,l) _getdcwd_nolock(d,s,le) |
| 185 |
#define _wgetdcwd_lk_dbg(d,s,le,t,f,l) _wgetdcwd_nolock(d,s,le) |
| 186 |
#endif |
| 187 |
|
| 188 |
#define _CrtSetReportHook(f) ((_CRT_REPORT_HOOK)0) |
| 189 |
#define _CrtGetReportHook() ((_CRT_REPORT_HOOK)0) |
| 190 |
#define _CrtSetReportHook2(t,f) ((int)0) |
| 191 |
#define _CrtSetReportHookW2(t,f) ((int)0) |
| 192 |
#define _CrtSetReportMode(t,f) ((int)0) |
| 193 |
#define _CrtSetReportFile(t,f) ((_HFILE)0) |
| 194 |
|
| 195 |
#define _CrtDbgBreak() ((void)0) |
| 196 |
|
| 197 |
#define _CrtSetBreakAlloc(a) ((long)0) |
| 198 |
#define _CrtSetAllocHook(f) ((_CRT_ALLOC_HOOK)0) |
| 199 |
#define _CrtGetAllocHook() ((_CRT_ALLOC_HOOK)0) |
| 200 |
#define _CrtCheckMemory() ((int)1) |
| 201 |
#define _CrtSetDbgFlag(f) ((int)0) |
| 202 |
#define _CrtDoForAllClientObjects(f,c) ((void)0) |
| 203 |
#define _CrtIsValidPointer(p,n,r) ((int)1) |
| 204 |
#define _CrtIsValidHeapPointer(p) ((int)1) |
| 205 |
#define _CrtIsMemoryBlock(p,t,r,f,l) ((int)1) |
| 206 |
#define _CrtReportBlockType(p) ((int)-1) |
| 207 |
#define _CrtSetDumpClient(f) ((_CRT_DUMP_CLIENT)0) |
| 208 |
#define _CrtGetDumpClient() ((_CRT_DUMP_CLIENT)0) |
| 209 |
#define _CrtMemCheckpoint(s) ((void)0) |
| 210 |
#define _CrtMemDifference(s1,s2,s3) ((int)0) |
| 211 |
#define _CrtMemDumpAllObjectsSince(s) ((void)0) |
| 212 |
#define _CrtMemDumpStatistics(s) ((void)0) |
| 213 |
#define _CrtDumpMemoryLeaks() ((int)0) |
| 214 |
#define _CrtSetDebugFillThreshold(t) ((size_t)0) |
| 215 |
#define _CrtSetCheckCount(f) ((int)0) |
| 216 |
#define _CrtGetCheckCount() ((int)0) |
| 217 |
|
| 218 |
#else /* _DEBUG */ |
| 219 |
|
| 220 |
_CRTIMP long * __cdecl __p__crtAssertBusy(void); |
| 221 |
#define _crtAssertBusy (*__p__crtAssertBusy()) |
| 222 |
|
| 223 |
_CRTIMP _CRT_REPORT_HOOK __cdecl _CrtGetReportHook(void); |
| 224 |
_CRTIMP _CRT_REPORT_HOOK __cdecl _CrtSetReportHook(_CRT_REPORT_HOOK _PFnNewHook); |
| 225 |
_CRTIMP int __cdecl _CrtSetReportHook2(int _Mode, _CRT_REPORT_HOOK _PFnNewHook); |
| 226 |
_CRTIMP int __cdecl _CrtSetReportHookW2(int _Mode, _CRT_REPORT_HOOKW _PFnNewHook); |
| 227 |
_CRTIMP int __cdecl _CrtSetReportMode(int _ReportType, int _ReportMode); |
| 228 |
_CRTIMP _HFILE __cdecl _CrtSetReportFile(int _ReportType, _HFILE _ReportFile); |
| 229 |
_CRTIMP int __cdecl _CrtDbgReport(int _ReportType, const char * _Filename, int _Linenumber, const char * _ModuleName, const char * _Format, ...); |
| 230 |
_CRTIMP size_t __cdecl _CrtSetDebugFillThreshold(size_t _NewDebugFillThreshold); |
| 231 |
_CRTIMP int __cdecl _CrtDbgReportW(int _ReportType, const wchar_t * _Filename, int _LineNumber, const wchar_t * _ModuleName, const wchar_t * _Format, ...); |
| 232 |
|
| 233 |
#define _ASSERT_EXPR(expr, msg) \ |
| 234 |
(void) ((!!(expr)) || \ |
| 235 |
(1 != _CrtDbgReportW(_CRT_ASSERT, _CRT_WIDE(__FILE__), __LINE__, NULL, msg)) || \ |
| 236 |
(_CrtDbgBreak(), 0)) |
| 237 |
|
| 238 |
#ifndef _ASSERT |
| 239 |
#define _ASSERT(expr) _ASSERT_EXPR((expr), NULL) |
| 240 |
#endif |
| 241 |
|
| 242 |
#ifndef _ASSERTE |
| 243 |
#define _ASSERTE(expr) _ASSERT_EXPR((expr), _CRT_WIDE(#expr)) |
| 244 |
#endif |
| 245 |
|
| 246 |
#ifndef _ASSERT_BASE |
| 247 |
#define _ASSERT_BASE _ASSERT_EXPR |
| 248 |
#endif |
| 249 |
|
| 250 |
#define _RPT_BASE(args) \ |
| 251 |
(void) ((1 != _CrtDbgReport args) || \ |
| 252 |
(_CrtDbgBreak(), 0)) |
| 253 |
|
| 254 |
#define _RPT_BASE_W(args) \ |
| 255 |
(void) ((1 != _CrtDbgReportW args) || \ |
| 256 |
(_CrtDbgBreak(), 0)) |
| 257 |
|
| 258 |
#define _RPT0(rptno, msg) \ |
| 259 |
_RPT_BASE((rptno, NULL, 0, NULL, "%s", msg)) |
| 260 |
|
| 261 |
#define _RPTW0(rptno, msg) \ |
| 262 |
_RPT_BASE_W((rptno, NULL, 0, NULL, L"%s", msg)) |
| 263 |
|
| 264 |
#define _RPT1(rptno, msg, arg1) \ |
| 265 |
_RPT_BASE((rptno, NULL, 0, NULL, msg, arg1)) |
| 266 |
|
| 267 |
#define _RPTW1(rptno, msg, arg1) \ |
| 268 |
_RPT_BASE_W((rptno, NULL, 0, NULL, msg, arg1)) |
| 269 |
|
| 270 |
#define _RPT2(rptno, msg, arg1, arg2) \ |
| 271 |
_RPT_BASE((rptno, NULL, 0, NULL, msg, arg1, arg2)) |
| 272 |
|
| 273 |
#define _RPTW2(rptno, msg, arg1, arg2) \ |
| 274 |
_RPT_BASE_W((rptno, NULL, 0, NULL, msg, arg1, arg2)) |
| 275 |
|
| 276 |
#define _RPT3(rptno, msg, arg1, arg2, arg3) \ |
| 277 |
_RPT_BASE((rptno, NULL, 0, NULL, msg, arg1, arg2, arg3)) |
| 278 |
|
| 279 |
#define _RPTW3(rptno, msg, arg1, arg2, arg3) \ |
| 280 |
_RPT_BASE_W((rptno, NULL, 0, NULL, msg, arg1, arg2, arg3)) |
| 281 |
|
| 282 |
#define _RPT4(rptno, msg, arg1, arg2, arg3, arg4) \ |
| 283 |
_RPT_BASE((rptno, NULL, 0, NULL, msg, arg1, arg2, arg3, arg4)) |
| 284 |
|
| 285 |
#define _RPTW4(rptno, msg, arg1, arg2, arg3, arg4) \ |
| 286 |
_RPT_BASE_W((rptno, NULL, 0, NULL, msg, arg1, arg2, arg3, arg4)) |
| 287 |
|
| 288 |
#define _RPT5(rptno, msg, arg1, arg2, arg3, arg4, arg5) \ |
| 289 |
_RPT_BASE((rptno, NULL, 0, NULL, msg, arg1, arg2, arg3, arg4, arg5)) |
| 290 |
|
| 291 |
#define _RPTW5(rptno, msg, arg1, arg2, arg3, arg4, arg5) \ |
| 292 |
_RPT_BASE_W((rptno, NULL, 0, NULL, msg, arg1, arg2, arg3, arg4, arg5)) |
| 293 |
|
| 294 |
#define _RPTF0(rptno, msg) \ |
| 295 |
_RPT_BASE((rptno, __FILE__, __LINE__, NULL, "%s", msg)) |
| 296 |
|
| 297 |
#define _RPTFW0(rptno, msg) \ |
| 298 |
_RPT_BASE_W((rptno, _CRT_WIDE(__FILE__), __LINE__, NULL, L"%s", msg)) |
| 299 |
|
| 300 |
#define _RPTF1(rptno, msg, arg1) \ |
| 301 |
_RPT_BASE((rptno, __FILE__, __LINE__, NULL, msg, arg1)) |
| 302 |
|
| 303 |
#define _RPTFW1(rptno, msg, arg1) \ |
| 304 |
_RPT_BASE_W((rptno, _CRT_WIDE(__FILE__), __LINE__, NULL, msg, arg1)) |
| 305 |
|
| 306 |
#define _RPTF2(rptno, msg, arg1, arg2) \ |
| 307 |
_RPT_BASE((rptno, __FILE__, __LINE__, NULL, msg, arg1, arg2)) |
| 308 |
|
| 309 |
#define _RPTFW2(rptno, msg, arg1, arg2) \ |
| 310 |
_RPT_BASE_W((rptno, _CRT_WIDE(__FILE__), __LINE__, NULL, msg, arg1, arg2)) |
| 311 |
|
| 312 |
#define _RPTF3(rptno, msg, arg1, arg2, arg3) \ |
| 313 |
_RPT_BASE((rptno, __FILE__, __LINE__, NULL, msg, arg1, arg2, arg3)) |
| 314 |
|
| 315 |
#define _RPTFW3(rptno, msg, arg1, arg2, arg3) \ |
| 316 |
_RPT_BASE_W((rptno, _CRT_WIDE(__FILE__), __LINE__, NULL, msg, arg1, arg2, arg3)) |
| 317 |
|
| 318 |
#define _RPTF4(rptno, msg, arg1, arg2, arg3, arg4) \ |
| 319 |
_RPT_BASE((rptno, __FILE__, __LINE__, NULL, msg, arg1, arg2, arg3, arg4)) |
| 320 |
|
| 321 |
#define _RPTFW4(rptno, msg, arg1, arg2, arg3, arg4) \ |
| 322 |
_RPT_BASE_W((rptno, _CRT_WIDE(__FILE__), __LINE__, NULL, msg, arg1, arg2, arg3, arg4)) |
| 323 |
|
| 324 |
#define _RPTF5(rptno, msg, arg1, arg2, arg3, arg4, arg5) \ |
| 325 |
_RPT_BASE((rptno, __FILE__, __LINE__, NULL, msg, arg1, arg2, arg3, arg4, arg5)) |
| 326 |
|
| 327 |
#define _RPTFW5(rptno, msg, arg1, arg2, arg3, arg4, arg5) \ |
| 328 |
_RPT_BASE_W((rptno, _CRT_WIDE(__FILE__), __LINE__, NULL, msg, arg1, arg2, arg3, arg4, arg5)) |
| 329 |
|
| 330 |
#define _CrtDbgBreak() __debugbreak() |
| 331 |
|
| 332 |
#ifdef _CRTDBG_MAP_ALLOC |
| 333 |
|
| 334 |
#define malloc(s) _malloc_dbg(s, _NORMAL_BLOCK, __FILE__, __LINE__) |
| 335 |
#define calloc(c, s) _calloc_dbg(c, s, _NORMAL_BLOCK, __FILE__, __LINE__) |
| 336 |
#define realloc(p, s) _realloc_dbg(p, s, _NORMAL_BLOCK, __FILE__, __LINE__) |
| 337 |
#define _recalloc(p, c, s) _recalloc_dbg(p, c, s, _NORMAL_BLOCK, __FILE__, __LINE__) |
| 338 |
#define _expand(p, s) _expand_dbg(p, s, _NORMAL_BLOCK, __FILE__, __LINE__) |
| 339 |
#define free(p) _free_dbg(p, _NORMAL_BLOCK) |
| 340 |
#define _msize(p) _msize_dbg(p, _NORMAL_BLOCK) |
| 341 |
#define _aligned_msize(p, a, o) _aligned_msize_dbg(p, a, o) |
| 342 |
#define _aligned_malloc(s, a) _aligned_malloc_dbg(s, a, __FILE__, __LINE__) |
| 343 |
#define _aligned_realloc(p, s, a) _aligned_realloc_dbg(p, s, a, __FILE__, __LINE__) |
| 344 |
#define _aligned_recalloc(p, c, s, a) _aligned_recalloc_dbg(p, c, s, a, __FILE__, __LINE__) |
| 345 |
#define _aligned_offset_malloc(s, a, o) _aligned_offset_malloc_dbg(s, a, o, __FILE__, __LINE__) |
| 346 |
#define _aligned_offset_realloc(p, s, a, o) _aligned_offset_realloc_dbg(p, s, a, o, __FILE__, __LINE__) |
| 347 |
#define _aligned_offset_recalloc(p, c, s, a, o) _aligned_offset_recalloc_dbg(p, c, s, a, o, __FILE__, __LINE__) |
| 348 |
#define _aligned_free(p) _aligned_free_dbg(p) |
| 349 |
|
| 350 |
#define _malloca(s) _malloca_dbg(s, _NORMAL_BLOCK, __FILE__, __LINE__) |
| 351 |
#define _freea(p) _freea_dbg(p, _NORMAL_BLOCK) |
| 352 |
|
| 353 |
#define _strdup(s) _strdup_dbg(s, _NORMAL_BLOCK, __FILE__, __LINE__) |
| 354 |
#define _wcsdup(s) _wcsdup_dbg(s, _NORMAL_BLOCK, __FILE__, __LINE__) |
| 355 |
#define _mbsdup(s) _strdup_dbg(s, _NORMAL_BLOCK, __FILE__, __LINE__) |
| 356 |
#define _tempnam(s1, s2) _tempnam_dbg(s1, s2, _NORMAL_BLOCK, __FILE__, __LINE__) |
| 357 |
#define _wtempnam(s1, s2) _wtempnam_dbg(s1, s2, _NORMAL_BLOCK, __FILE__, __LINE__) |
| 358 |
#define _fullpath(s1, s2, le) _fullpath_dbg(s1, s2, le, _NORMAL_BLOCK, __FILE__, __LINE__) |
| 359 |
#define _wfullpath(s1, s2, le) _wfullpath_dbg(s1, s2, le, _NORMAL_BLOCK, __FILE__, __LINE__) |
| 360 |
#define _getcwd(s, le) _getcwd_dbg(s, le, _NORMAL_BLOCK, __FILE__, __LINE__) |
| 361 |
#define _wgetcwd(s, le) _wgetcwd_dbg(s, le, _NORMAL_BLOCK, __FILE__, __LINE__) |
| 362 |
#define _getdcwd(d, s, le) _getdcwd_dbg(d, s, le, _NORMAL_BLOCK, __FILE__, __LINE__) |
| 363 |
#define _wgetdcwd(d, s, le) _wgetdcwd_dbg(d, s, le, _NORMAL_BLOCK, __FILE__, __LINE__) |
| 364 |
#define _getdcwd_nolock(d, s, le) _getdcwd_lk_dbg(d, s, le, _NORMAL_BLOCK, __FILE__, __LINE__) |
| 365 |
#define _wgetdcwd_nolock(d, s, le) _wgetdcwd_lk_dbg(d, s, le, _NORMAL_BLOCK, __FILE__, __LINE__) |
| 366 |
#define _dupenv_s(ps1, size, s2) _dupenv_s_dbg(ps1, size, s2, _NORMAL_BLOCK, __FILE__, __LINE__) |
| 367 |
#define _wdupenv_s(ps1, size, s2) _wdupenv_s_dbg(ps1, size, s2, _NORMAL_BLOCK, __FILE__, __LINE__) |
| 368 |
|
| 369 |
#define strdup(s) _strdup_dbg(s, _NORMAL_BLOCK, __FILE__, __LINE__) |
| 370 |
#define wcsdup(s) _wcsdup_dbg(s, _NORMAL_BLOCK, __FILE__, __LINE__) |
| 371 |
#define tempnam(s1, s2) _tempnam_dbg(s1, s2, _NORMAL_BLOCK, __FILE__, __LINE__) |
| 372 |
#define getcwd(s, le) _getcwd_dbg(s, le, _NORMAL_BLOCK, __FILE__, __LINE__) |
| 373 |
|
| 374 |
#endif /* _CRTDBG_MAP_ALLOC */ |
| 375 |
|
| 376 |
_CRTIMP long * __cdecl __p__crtBreakAlloc(void); |
| 377 |
#define _crtBreakAlloc (*__p__crtBreakAlloc()) |
| 378 |
|
| 379 |
_CRTIMP long __cdecl _CrtSetBreakAlloc(long _BreakAlloc); |
| 380 |
|
| 381 |
_CRTIMP __checkReturn void * __cdecl _malloc_dbg(size_t _Size, int _BlockType, const char * _Filename, int _LineNumber); |
| 382 |
_CRTIMP __checkReturn void * __cdecl _calloc_dbg(size_t _NumOfElements, size_t _SizeOfElements, int _BlockType, const char * _Filename, int _LineNumber); |
| 383 |
_CRTIMP __checkReturn void * __cdecl _realloc_dbg(void * _Memory, size_t _NewSize, int _BlockType, const char * _Filename, int _LineNumber); |
| 384 |
_CRTIMP __checkReturn void * __cdecl _recalloc_dbg(void * _Memory, size_t _NumOfElements, size_t _SizeOfElements, int _BlockType, const char * _Filename, int _LineNumber); |
| 385 |
_CRTIMP __checkReturn void * __cdecl _expand_dbg(void * _Memory, size_t _NewSize, int _BlockType, const char * _Filename, int _LineNumber); |
| 386 |
_CRTIMP void __cdecl _free_dbg(void * _Memory, int _BlockType); |
| 387 |
_CRTIMP size_t __cdecl _msize_dbg(void * _Memory, int _BlockType); |
| 388 |
_CRTIMP size_t __cdecl _aligned_msize_dbg(void * _Memory, size_t _Alignment, size_t _Offset); |
| 389 |
_CRTIMP __checkReturn void * __cdecl _aligned_malloc_dbg(size_t _Size, size_t _Alignment, const char * _Filename, int _LineNumber); |
| 390 |
_CRTIMP __checkReturn void * __cdecl _aligned_realloc_dbg(void * _Memory, size_t _Size, size_t _Alignment, const char * _Filename, int _LineNumber); |
| 391 |
_CRTIMP __checkReturn void * __cdecl _aligned_recalloc_dbg(void * _Memory, size_t _NumOfElements, size_t _SizeOfElements, size_t _Alignment, const char * _Filename, int _LineNumber); |
| 392 |
_CRTIMP __checkReturn void * __cdecl _aligned_offset_malloc_dbg(size_t _Size, size_t _Alignment, size_t _Offset, const char * _Filename, int _LineNumber); |
| 393 |
_CRTIMP __checkReturn void * __cdecl _aligned_offset_realloc_dbg(void * _Memory, size_t _Size, size_t _Alignment, size_t _Offset, const char * _Filename, int _LineNumber); |
| 394 |
_CRTIMP __checkReturn void * __cdecl _aligned_offset_recalloc_dbg(void * _Memory, size_t _NumOfElements, size_t _SizeOfElements, size_t _Alignment, size_t _Offset, const char * _Filename, int _LineNumber); |
| 395 |
_CRTIMP void __cdecl _aligned_free_dbg(void * _Memory); |
| 396 |
_CRTIMP __checkReturn char * __cdecl _strdup_dbg(const char * _Str, int _BlockType, const char * _Filename, int _LineNumber); |
| 397 |
_CRTIMP __checkReturn wchar_t * __cdecl _wcsdup_dbg(const wchar_t * _Str, int _BlockType, const char * _Filename, int _LineNumber); |
| 398 |
_CRTIMP __checkReturn char * __cdecl _tempnam_dbg(const char * _DirName, const char * _FilePrefix, int _BlockType, const char * _Filename, int _LineNumber); |
| 399 |
_CRTIMP __checkReturn wchar_t * __cdecl _wtempnam_dbg(const wchar_t * _DirName, const wchar_t * _FilePrefix, int _BlockType, const char * _Filename, int _LineNumber); |
| 400 |
_CRTIMP __checkReturn char * __cdecl _fullpath_dbg(char * _FullPath, const char * _Path, size_t _SizeInBytes, int _BlockType, const char * _Filename, int _LineNumber); |
| 401 |
_CRTIMP __checkReturn wchar_t * __cdecl _wfullpath_dbg(wchar_t * _FullPath, const wchar_t * _Path, size_t _SizeInWords, int _BlockType, const char * _Filename, int _LineNumber); |
| 402 |
_CRTIMP __checkReturn char * __cdecl _getcwd_dbg(char * _DstBuf, int _SizeInBytes, int _BlockType, const char * _Filename, int _LineNumber); |
| 403 |
_CRTIMP __checkReturn wchar_t * __cdecl _wgetcwd_dbg(wchar_t * _DstBuf, int _SizeInWords, int _BlockType, const char * _Filename, int _LineNumber); |
| 404 |
_CRTIMP __checkReturn char * __cdecl _getdcwd_dbg(int _Drive, char * _DstBuf, int _SizeInBytes, int _BlockType, const char * _Filename, int _LineNumber); |
| 405 |
_CRTIMP __checkReturn wchar_t * __cdecl _wgetdcwd_dbg(int _Drive, wchar_t * _DstBuf, int _SizeInWords, int _BlockType, const char * _Filename, int _LineNumber); |
| 406 |
__checkReturn char * __cdecl _getdcwd_lk_dbg(int _Drive, char * _DstBuf, int _SizeInBytes, int _BlockType, const char * _Filename, int _LineNumber); |
| 407 |
__checkReturn wchar_t * __cdecl _wgetdcwd_lk_dbg(int _Drive, wchar_t * _DstBuf, int _SizeInWords, int _BlockType, const char * _Filename, int _LineNumber); |
| 408 |
_CRTIMP __checkReturn errno_t __cdecl _dupenv_s_dbg(char ** _PBuffer, size_t * _PBufferSizeInBytes, const char * _VarName, int _BlockType, const char * _Filename, int _LineNumber); |
| 409 |
_CRTIMP __checkReturn errno_t __cdecl _wdupenv_s_dbg(wchar_t ** _PBuffer, size_t * _PBufferSizeInWords, const wchar_t * _VarName, int _BlockType, const char * _Filename, int _LineNumber); |
| 410 |
|
| 411 |
#define _malloca_dbg(s, t, f, l) _malloc_dbg(s, t, f, l) |
| 412 |
#define _freea_dbg(p, t) _free_dbg(p, t) |
| 413 |
|
| 414 |
_CRTIMP _CRT_ALLOC_HOOK __cdecl _CrtGetAllocHook(void); |
| 415 |
_CRTIMP _CRT_ALLOC_HOOK __cdecl _CrtSetAllocHook(_CRT_ALLOC_HOOK _PfnNewHook); |
| 416 |
|
| 417 |
_CRTIMP int * __cdecl __p__crtDbgFlag(void); |
| 418 |
#define _crtDbgFlag (*__p__crtDbgFlag()) |
| 419 |
|
| 420 |
_CRTIMP int __cdecl _CrtCheckMemory(void); |
| 421 |
_CRTIMP int __cdecl _CrtSetDbgFlag(int _NewFlag); |
| 422 |
_CRTIMP void __cdecl _CrtDoForAllClientObjects(void (__cdecl *_PFn)(void *, void *), void * _Context); |
| 423 |
_CRTIMP __checkReturn int __cdecl _CrtIsValidPointer(const void * _Ptr, unsigned int _Bytes, int _ReadWrite); |
| 424 |
_CRTIMP __checkReturn int __cdecl _CrtIsValidHeapPointer(const void * _HeapPtr); |
| 425 |
_CRTIMP int __cdecl _CrtIsMemoryBlock(const void * _Memory, unsigned int _Bytes, long * _RequestNumber, char ** _Filename, int * _LineNumber); |
| 426 |
_CRTIMP __checkReturn int __cdecl _CrtReportBlockType(const void * _Memory); |
| 427 |
_CRTIMP _CRT_DUMP_CLIENT __cdecl _CrtGetDumpClient(void); |
| 428 |
_CRTIMP _CRT_DUMP_CLIENT __cdecl _CrtSetDumpClient(_CRT_DUMP_CLIENT _PFnNewDump); |
| 429 |
_CRTIMP _CRT_MANAGED_HEAP_DEPRECATE void __cdecl _CrtMemCheckpoint(_CrtMemState * _State); |
| 430 |
_CRTIMP _CRT_MANAGED_HEAP_DEPRECATE int __cdecl _CrtMemDifference(_CrtMemState * _State, const _CrtMemState * _OldState, const _CrtMemState * _NewState); |
| 431 |
_CRTIMP void __cdecl _CrtMemDumpAllObjectsSince(const _CrtMemState * _State); |
| 432 |
_CRTIMP void __cdecl _CrtMemDumpStatistics(const _CrtMemState * _State); |
| 433 |
_CRTIMP int __cdecl _CrtDumpMemoryLeaks(void); |
| 434 |
_CRTIMP int __cdecl _CrtSetCheckCount(int _CheckCount); |
| 435 |
_CRTIMP int __cdecl _CrtGetCheckCount(void); |
| 436 |
|
| 437 |
#endif /* _DEBUG */ |
| 438 |
|
| 439 |
#ifdef __cplusplus |
| 440 |
} |
| 441 |
/* |
| 442 |
void *__cdecl operator new[](size_t _Size); |
| 443 |
inline void *__cdecl operator new(size_t _Size,int,const char *,int) { return ::operator new(_Size); } |
| 444 |
inline void *__cdecl operator new[](size_t _Size,int,const char *,int) { return ::operator new[](_Size); } |
| 445 |
void __cdecl operator delete[](void *); |
| 446 |
inline void __cdecl operator delete(void *_P,int,const char *,int) { ::operator delete(_P); } |
| 447 |
inline void __cdecl operator delete[](void *_P,int,const char *,int) { ::operator delete[](_P); } |
| 448 |
*/ |
| 449 |
#endif |
| 450 |
|
| 451 |
#pragma pack(pop) |
| 452 |
|
| 453 |
#include <sec_api/crtdbg_s.h> |
| 454 |
|
| 455 |
#endif |