diff options
author | Sergei Golubchik <sergii@pisem.net> | 2011-12-12 22:58:24 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2011-12-12 22:58:24 +0100 |
commit | 6cc9d0ffa0b6d9d0f19cf9445fad0e0ba11e38f8 (patch) | |
tree | 6952bb89985c14f7ad5e362dd350d191cadd0d69 /mysys/my_malloc.c | |
parent | 37c81d81b3940a21b500aff6aeb70e8b1df0b7e8 (diff) | |
download | mariadb-git-6cc9d0ffa0b6d9d0f19cf9445fad0e0ba11e38f8.tar.gz |
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.
Diffstat (limited to 'mysys/my_malloc.c')
-rw-r--r-- | mysys/my_malloc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mysys/my_malloc.c b/mysys/my_malloc.c index 24bccf37ece..82fbe3a63f7 100644 --- a/mysys/my_malloc.c +++ b/mysys/my_malloc.c @@ -37,7 +37,7 @@ void *my_malloc(size_t size, myf my_flags) if (!size) size=1; - point= DBUG_MALLOC(size); + point= sf_malloc(size); DBUG_EXECUTE_IF("simulate_out_of_memory", { my_free(point); @@ -85,7 +85,7 @@ void *my_realloc(void *oldpoint, size_t size, myf my_flags) DBUG_ASSERT(size > 0); if (!oldpoint && (my_flags & MY_ALLOW_ZERO_PTR)) DBUG_RETURN(my_malloc(size, my_flags)); - if ((point= DBUG_REALLOC(oldpoint, size)) == NULL) + if ((point= sf_realloc(oldpoint, size)) == NULL) { if (my_flags & MY_FREE_ON_ERROR) my_free(oldpoint); @@ -111,7 +111,7 @@ void my_free(void *ptr) { DBUG_ENTER("my_free"); DBUG_PRINT("my",("ptr: %p", ptr)); - DBUG_FREE(ptr); + sf_free(ptr); DBUG_VOID_RETURN; } |