From: fred Date: Tue, 17 Dec 1996 01:23:36 +0000 (+0000) Subject: lilypond-0.0.17 X-Git-Tag: release/1.5.59~6572 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=1a5d901e025e3570350f082c98d09da748e919b4;p=lilypond.git lilypond-0.0.17 --- diff --git a/src/debug.cc b/src/debug.cc index 7620027c91..eaed33f080 100644 --- a/src/debug.cc +++ b/src/debug.cc @@ -1,5 +1,6 @@ #include #include +#include #include "debug.hh" #include "dstream.hh" #include "vector.hh" @@ -33,3 +34,34 @@ set_debug(bool b) { check_debug =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