From 6cc9d0ffa0b6d9d0f19cf9445fad0e0ba11e38f8 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 12 Dec 2011 22:58:24 +0100 Subject: move safemalloc out of dbug. remeber a real backtrace for every allocation. make safemalloc to tract C++ new/delete too. collateral fixes to make the test suite pass. --- mysys/mysys_priv.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'mysys/mysys_priv.h') diff --git a/mysys/mysys_priv.h b/mysys/mysys_priv.h index 2c0c8bf82f8..f5d2f301837 100644 --- a/mysys/mysys_priv.h +++ b/mysys/mysys_priv.h @@ -69,6 +69,15 @@ extern PSI_file_key key_file_proc_meminfo; extern PSI_file_key key_file_charset, key_file_cnf; #endif /* HAVE_PSI_INTERFACE */ +#ifdef SAFEMALLOC +void *sf_malloc(size_t size); +void *sf_realloc(void *ptr, size_t size); +void sf_free(void *ptr); +#else +#define sf_malloc(X) malloc(X) +#define sf_realloc(X,Y) realloc(X,Y) +#define sf_free(X) free(X) +#endif /* EDQUOT is used only in 3 C files only in mysys/. If it does not exist on -- cgit v1.2.1