summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1997-12-04 07:49:37 +0000
committerAndrew Tridgell <tridge@samba.org>1997-12-04 07:49:37 +0000
commitd9bb3a4eba9c630370fea0fa297b176fd2afb532 (patch)
treedb8b03dde4040aabd7a4436ad07e6887e60c9b1a
parentb524c8da5141e3e030e14b3a0167fa5c7ae91396 (diff)
downloadsamba-d9bb3a4eba9c630370fea0fa297b176fd2afb532.tar.gz
samba-d9bb3a4eba9c630370fea0fa297b176fd2afb532.tar.xz
samba-d9bb3a4eba9c630370fea0fa297b176fd2afb532.zip
got rid of the WRAP_MALLOC code - mem_man does it better
-rw-r--r--source/lib/replace.c67
1 files changed, 0 insertions, 67 deletions
diff --git a/source/lib/replace.c b/source/lib/replace.c
index 67c18a15237..b27909db034 100644
--- a/source/lib/replace.c
+++ b/source/lib/replace.c
@@ -238,73 +238,6 @@ long nap(long milliseconds) {
#endif
-
-#if WRAP_MALLOC
-
-/* undo the wrapping temporarily */
-#undef malloc
-#undef realloc
-#undef free
-
-/****************************************************************************
-wrapper for malloc() to catch memory errors
-****************************************************************************/
-void *malloc_wrapped(int size,char *file,int line)
-{
-#ifdef xx_old_malloc
- void *res = xx_old_malloc(size);
-#else
- void *res = malloc(size);
-#endif
- DEBUG(3,("Malloc called from %s(%d) with size=%d gave ptr=0x%X\n",
- file,line,
- size,(unsigned int)res));
- return(res);
-}
-
-/****************************************************************************
-wrapper for realloc() to catch memory errors
-****************************************************************************/
-void *realloc_wrapped(void *ptr,int size,char *file,int line)
-{
-#ifdef xx_old_realloc
- void *res = xx_old_realloc(ptr,size);
-#else
- void *res = realloc(ptr,size);
-#endif
- DEBUG(3,("Realloc\n"));
- DEBUG(3,("free called from %s(%d) with ptr=0x%X\n",
- file,line,
- (unsigned int)ptr));
- DEBUG(3,("Malloc called from %s(%d) with size=%d gave ptr=0x%X\n",
- file,line,
- size,(unsigned int)res));
- return(res);
-}
-
-/****************************************************************************
-wrapper for free() to catch memory errors
-****************************************************************************/
-void free_wrapped(void *ptr,char *file,int line)
-{
-#ifdef xx_old_free
- xx_old_free(ptr);
-#else
- free(ptr);
-#endif
- DEBUG(3,("free called from %s(%d) with ptr=0x%X\n",
- file,line,(unsigned int)ptr));
- return;
-}
-
-/* and re-do the define for spots lower in this file */
-#define malloc(size) malloc_wrapped(size,__FILE__,__LINE__)
-#define realloc(ptr,size) realloc_wrapped(ptr,size,__FILE__,__LINE__)
-#define free(ptr) free_wrapped(ptr,__FILE__,__LINE__)
-
-#endif
-
-
#if WRAP_MEMCPY
#undef memcpy
/*******************************************************************