diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2014-09-11 21:38:09 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2014-09-11 21:38:09 +0000 |
commit | 754171ae60abbbd707ed8d449f07ef38f596bd22 (patch) | |
tree | 67d2b76905535d056ba6911186285d0325dc703f /source/include/platform/acmsvc.h | |
parent | e599b42ef5047e5546af949d87d2cfd2e17062b0 (diff) |
Notes
Diffstat (limited to 'source/include/platform/acmsvc.h')
-rw-r--r-- | source/include/platform/acmsvc.h | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/source/include/platform/acmsvc.h b/source/include/platform/acmsvc.h index ec664b00da1a..845a319907cb 100644 --- a/source/include/platform/acmsvc.h +++ b/source/include/platform/acmsvc.h @@ -150,6 +150,10 @@ /* Debug support. Must be last in this file, do not move. */ #ifdef _DEBUG +#define _CRTDBG_MAP_ALLOC /* Enables specific file/lineno for leaks */ + +#include <stdlib.h> +#include <malloc.h> #include <crtdbg.h> /* @@ -159,9 +163,26 @@ * This can quickly localize the memory corruption. */ #define ACPI_DEBUG_INITIALIZE() \ - _CrtSetDbgFlag (_CRTDBG_CHECK_ALWAYS_DF | \ - _CRTDBG_ALLOC_MEM_DF | _CRTDBG_CHECK_CRT_DF | \ - _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG)) + _CrtSetDbgFlag (\ + _CRTDBG_CHECK_ALWAYS_DF | \ + _CRTDBG_ALLOC_MEM_DF | \ + _CRTDBG_DELAY_FREE_MEM_DF | \ + _CRTDBG_LEAK_CHECK_DF | \ + _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG)); + +#if 0 +/* + * _CrtSetBreakAlloc can be used to set a breakpoint at a particular + * memory leak, add to the macro above. + */ +Detected memory leaks! +Dumping objects -> +..\..\source\os_specific\service_layers\oswinxf.c(701) : {937} normal block at 0x002E9190, 40 bytes long. + Data: < > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + +_CrtSetBreakAlloc (937); +#endif + #endif #endif /* __ACMSVC_H__ */ |