summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/my_dbug.h9
-rw-r--r--include/my_stacktrace.h1
-rw-r--r--include/my_sys.h6
-rw-r--r--include/my_valgrind.h1
4 files changed, 6 insertions, 11 deletions
diff --git a/include/my_dbug.h b/include/my_dbug.h
index 920ba4d4f90..fb5838e8b5c 100644
--- a/include/my_dbug.h
+++ b/include/my_dbug.h
@@ -60,9 +60,6 @@ extern void _db_unlock_file_(void);
extern FILE *_db_fp_(void);
extern void _db_flush_();
extern const char* _db_get_func_(void);
-extern void *_db_malloc_(size_t size);
-extern void *_db_realloc_(void *ptr, size_t size);
-extern void _db_free_(void *ptr);
#define DBUG_ENTER(a) struct _db_stack_frame_ _db_stack_frame_; \
_db_enter_ (a,__FILE__,__LINE__,&_db_stack_frame_)
@@ -95,9 +92,6 @@ extern void _db_free_(void *ptr);
#define DBUG_EXPLAIN_INITIAL(buf,len) _db_explain_init_((buf),(len))
#define DEBUGGER_OFF do { _dbug_on_= 0; } while(0)
#define DEBUGGER_ON do { _dbug_on_= 1; } while(0)
-#define DBUG_MALLOC(SIZE) _db_malloc_(SIZE)
-#define DBUG_REALLOC(PTR,SIZE) _db_realloc_(PTR,SIZE)
-#define DBUG_FREE(PTR) _db_free_(PTR)
#define IF_DBUG(A,B) A
#ifndef __WIN__
@@ -156,9 +150,6 @@ extern void _db_suicide_();
#define DBUG_EXPLAIN_INITIAL(buf,len)
#define DEBUGGER_OFF do { } while(0)
#define DEBUGGER_ON do { } while(0)
-#define DBUG_MALLOC(SIZE) malloc(SIZE)
-#define DBUG_REALLOC(PTR,SIZE) realloc(PTR,SIZE)
-#define DBUG_FREE(PTR) free(PTR)
#define IF_DBUG(A,B) B
#define DBUG_ABORT() do { } while(0)
#define DBUG_CRASH_ENTER(func)
diff --git a/include/my_stacktrace.h b/include/my_stacktrace.h
index f5229a4b0af..30f0203a43e 100644
--- a/include/my_stacktrace.h
+++ b/include/my_stacktrace.h
@@ -55,6 +55,7 @@ void my_set_exception_pointers(EXCEPTION_POINTERS *ep);
#endif
#endif
+/* at the moment, safemalloc is the main user of libbfd */
#ifndef SAFEMALLOC
#undef HAVE_BFD_H
#endif
diff --git a/include/my_sys.h b/include/my_sys.h
index dbf999edac8..cb5fa317888 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -153,8 +153,10 @@ extern void *my_realloc(void *oldpoint, size_t Size, myf MyFlags);
extern void my_free(void *ptr);
extern void *my_memdup(const void *from,size_t length,myf MyFlags);
extern char *my_strdup(const char *from,myf MyFlags);
-extern char *my_strndup(const char *from, size_t length,
- myf MyFlags);
+extern char *my_strndup(const char *from, size_t length, myf MyFlags);
+
+extern int sf_leaking_memory; /* set to 1 to disable memleak detection */
+
#if defined(ENABLED_DEBUG_SYNC)
extern void (*debug_sync_C_callback_ptr)(const char *, size_t);
#define DEBUG_SYNC_C(_sync_point_name_) do { \
diff --git a/include/my_valgrind.h b/include/my_valgrind.h
index 87e6c3192dc..f82dd35b369 100644
--- a/include/my_valgrind.h
+++ b/include/my_valgrind.h
@@ -15,6 +15,7 @@
/* Some defines to make it easier to use valgrind */
+#include <m_string.h> /* bfill */
#ifdef HAVE_valgrind
#define IF_VALGRIND(A,B) A