From: fred Date: Thu, 9 Jan 1997 17:24:40 +0000 (+0000) Subject: lilypond-0.0.22 X-Git-Tag: release/1.5.59~6425 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=1ef93dfe6693bd56cf065489b336617a382e7616;p=lilypond.git lilypond-0.0.22 --- diff --git a/src/debug.cc b/src/debug.cc index 1d27e81359..ea0cb4b8c4 100644 --- a/src/debug.cc +++ b/src/debug.cc @@ -16,7 +16,6 @@ ostream * nulldev = new ofstream("/dev/null"); void mynewhandler() { - cerr << "Out of free store memory. Aborting.. "<< flush; assert(false); } @@ -30,7 +29,9 @@ float_handler(int) void debug_init() { +#ifndef NDEBUG set_new_handler(&mynewhandler); +#endif set_matrix_debug(monitor); signal(SIGFPE, float_handler); } @@ -44,32 +45,3 @@ set_debug(bool b) } -#if 0 // want to debug mem functions - - -/// -static -void foobulize(void *p , size_t s) -{ -// assert(s < 2000000); - memset(p, 0xf0, s); -} -/** - trash a portion of memory. Make sure access to deleted stuff is bogus. - */ -void * -operator new (size_t s) -{ - void *p = malloc(s); - assert(p); -// foobulize(p,s); - return p; -} - -void -operator delete(void *p, size_t s) -{ - foobulize(p,s); - free(p); -} -#endif