summaryrefslogtreecommitdiff
path: root/lib/gras_impl/debug.hpp
diff options
context:
space:
mode:
authorJosh Blum2012-10-02 20:33:18 -0700
committerJosh Blum2012-10-02 20:33:18 -0700
commitcd9494ea5ab089ff0594b22b36e28362a59961c4 (patch)
tree893879285adc6974df38798bf8a594ef6bd94f86 /lib/gras_impl/debug.hpp
parentd4cd9770dc973c2a506faeca80777ccda93323e3 (diff)
downloadsandhi-cd9494ea5ab089ff0594b22b36e28362a59961c4.tar.gz
sandhi-cd9494ea5ab089ff0594b22b36e28362a59961c4.tar.bz2
sandhi-cd9494ea5ab089ff0594b22b36e28362a59961c4.zip
ifdef'able hooks for allocation debugging
Diffstat (limited to 'lib/gras_impl/debug.hpp')
-rw-r--r--lib/gras_impl/debug.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/gras_impl/debug.hpp b/lib/gras_impl/debug.hpp
index 077ac5d..a817e12 100644
--- a/lib/gras_impl/debug.hpp
+++ b/lib/gras_impl/debug.hpp
@@ -17,6 +17,12 @@
#ifndef INCLUDED_LIBGRAS_IMPL_DEBUG_HPP
#define INCLUDED_LIBGRAS_IMPL_DEBUG_HPP
+//#define MALLOC_DEBUG
+#ifdef MALLOC_DEBUG
+#include <stdexcept>
+extern void *operator new(std::size_t n) throw (std::bad_alloc);
+#endif
+
#include <iostream>
#include <stdexcept>
#include <boost/current_function.hpp>