diff options
Diffstat (limited to 'source/include/platform/acmsvc.h')
-rw-r--r-- | source/include/platform/acmsvc.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/source/include/platform/acmsvc.h b/source/include/platform/acmsvc.h index 799dfdb0a28e..d552f7d59964 100644 --- a/source/include/platform/acmsvc.h +++ b/source/include/platform/acmsvc.h @@ -146,4 +146,22 @@ #pragma warning( disable : 4295 ) /* needed for acpredef.h array */ #endif + +/* Debug support. Must be last in this file, do not move. */ + +#ifdef _DEBUG +#include <crtdbg.h> + +/* + * Debugging memory corruption issues with windows: + * Add #include <crtdbg.h> to accommon.h if necessary. + * Add _ASSERTE(_CrtCheckMemory()); where needed to test memory integrity. + * 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)) +#endif + #endif /* __ACMSVC_H__ */ |