デバグ関数への切り替えに _CRTDBG_MAP_ALLOC を使うようにした
@@ -29,17 +29,13 @@ | ||
29 | 29 | #include <windows.h> |
30 | 30 | #include <tchar.h> |
31 | 31 | #include <assert.h> |
32 | +#if !defined(_CRTDBG_MAP_ALLOC) | |
33 | +#define _CRTDBG_MAP_ALLOC | |
34 | +#endif | |
32 | 35 | #include <crtdbg.h> |
33 | 36 | |
34 | 37 | #include "dllutil.h" |
35 | 38 | |
36 | -#ifdef _DEBUG | |
37 | -#define malloc(l) _malloc_dbg((l), _NORMAL_BLOCK, __FILE__, __LINE__) | |
38 | -#define free(p) _free_dbg((p), _NORMAL_BLOCK) | |
39 | -#define _strdup(s) _strdup_dbg((s), _NORMAL_BLOCK, __FILE__, __LINE__) | |
40 | -#define realloc(p, l) _realloc_dbg((p), (l), _NORMAL_BLOCK, __FILE__, __LINE__) | |
41 | -#endif | |
42 | - | |
43 | 39 | typedef struct { |
44 | 40 | const TCHAR *dllName; |
45 | 41 | DLLLoadFlag LoadFlag; |