]> git.donarmstrong.com Git - lilypond.git/blobdiff - debug.cc
release: 0.0.7
[lilypond.git] / debug.cc
index 34859a3c9f70c93242c47e6a4b1589198f816229..d55c90194598e28ce16802aa9abd58e3ef8fd7f2 100644 (file)
--- a/debug.cc
+++ b/debug.cc
@@ -1,12 +1,27 @@
 #include <fstream.h>
+#include <std/new.h>
 #include "debug.hh"
 #include "dstream.hh"
 #include "vector.hh"
 
 Dstream monitor(&cout,".dstreamrc");
 ostream * nulldev = new ofstream("/dev/null");
+
+
+/*
+  want to do a stacktrace .
+  */
+void
+mynewhandler()
+{
+    cerr << "Out of free store memory. Aborting.. "<< flush;
+    assert(false);
+}
+
+
 void
 debug_init()
 {
+    set_new_handler(&mynewhandler);
     set_matrix_debug(monitor);
 }