summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2012-10-02 16:06:14 -0500
committerDave Parks <davep@lindenlab.com>2012-10-02 16:06:14 -0500
commit05dbd7dafe0e060e82aeedb5404101367bd4c622 (patch)
tree3fad9d309ab3610e1f5cf82a3d1145af087a6e2b /indra/llcommon
parentbc0abc773451d5a71f7f0b024e8d389327425446 (diff)
Instrument debug builds on windows to help track down source of heap corruption
Diffstat (limited to 'indra/llcommon')
-rw-r--r--indra/llcommon/llmemory.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/indra/llcommon/llmemory.h b/indra/llcommon/llmemory.h
index f37e8459ff..fd3b9d342a 100644
--- a/indra/llcommon/llmemory.h
+++ b/indra/llcommon/llmemory.h
@@ -27,6 +27,13 @@
#define LLMEMORY_H
#include "llmemtype.h"
+
+#if LL_WINDOWS && LL_DEBUG
+#define LL_CHECK_MEMORY llassert(_CrtCheckMemory());
+#else
+#define LL_CHECK_MEMORY
+#endif
+
inline void* ll_aligned_malloc( size_t size, int align )
{
void* mem = malloc( size + (align - 1) + sizeof(void*) );