diff options
author | Adrian Knoth <adi@drcomp.erfurt.thur.de> | 2013-04-22 20:15:46 +0200 |
---|---|---|
committer | Adrian Knoth <adi@drcomp.erfurt.thur.de> | 2013-04-22 20:18:36 +0200 |
commit | 13ad68c73c9c162c9fc48daab1d2b05ec27a3786 (patch) | |
tree | 3f74abdc82d79f3b82730ad7da3dc8edd440fe84 /libs/pbd | |
parent | ef1fb4161af256e4a0047315d999531abb6382eb (diff) |
Drop obsolete dmalloc.cc from libs/pbd.
The file relies on -DDEBUG_MALLOC and references
i #include "/usr/local/src/dmalloc-4.1.2/return.h"
It is safe to assume that it's dead code.
Diffstat (limited to 'libs/pbd')
-rw-r--r-- | libs/pbd/dmalloc.cc | 102 |
1 files changed, 0 insertions, 102 deletions
diff --git a/libs/pbd/dmalloc.cc b/libs/pbd/dmalloc.cc deleted file mode 100644 index 0e730946c8..0000000000 --- a/libs/pbd/dmalloc.cc +++ /dev/null @@ -1,102 +0,0 @@ -/* - * file that facilitates C++ program debugging. - * - * Copyright 1995 by Gray Watson - * - * This file is part of the dmalloc package. - * - * Permission to use, copy, modify, and distribute this software for any - * NON-COMMERCIAL purpose and without fee is hereby granted, provided - * that the above copyright notice and this permission notice appear - * in all copies, and that the name of Gray Watson not be used in - * advertising or publicity pertaining to distribution of the document - * or software without specific, written prior permission. - * - * Please see the PERMISSIONS file or contact the author for information - * about commercial licenses. - * - * Gray Watson makes no representations about the suitability of the - * software described herein for any purpose. It is provided "as is" - * without express or implied warranty. - * - * The author may be contacted via http://www.letters.com/~gray/ - * - * $Id$ - */ - -/* - * This file is used to effectively redirect new to the more familiar - * malloc and delete to the more familiar free so they can be debugged - * with the debug malloc library.. They also give the known error - * behavior, too. - * - * Compile and link this in with the C++ program you want to debug. - * - * NOTE: I am not a C++ hacker so feedback in the form of other hints - * and ideas for C++ users would be much appreciated. - */ - -#ifdef DEBUG_MALLOC - -extern "C" { -#include <stdlib.h> -#include <dmalloc.h> -#include "/usr/local/src/dmalloc-4.1.2/return.h" -} - -/* - * An overload function for the C++ new. - */ -void * -operator new(size_t size) -{ - char *file; - GET_RET_ADDR(file); - - /* handle correct C++ semantics for an alloc of size 0 */ - - if (size == 0) size = 1; - - return _malloc_leap(file, 0, size); -} - -/* - * An overload function for the C++ new[]. - */ -void * -operator new[](size_t size) -{ - char *file; - GET_RET_ADDR(file); - - /* handle correct C++ semantics for an alloc of size 0 */ - - if (size == 0) size = 1; - - return _malloc_leap(file, 0, size); -} - -/* - * An overload function for the C++ delete. - */ -void -operator delete(void *pnt) -{ - char *file; - GET_RET_ADDR(file); - _free_leap(file, 0, pnt); -} - -/* - * An overload function for the C++ delete[]. Thanks to Jens Krinke - * <j.krinke@gmx.de> - */ -void -operator delete[](void *pnt) -{ - char *file; - GET_RET_ADDR(file); - _free_leap(file, 0, pnt); -} - -#endif |