Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
d174eed5
Commit
d174eed5
authored
Mar 27, 2012
by
antirez
Browse files
define zlibc_free() in a way that is not shadowed by jemalloc.
parent
23c0cdd2
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/zmalloc.c
View file @
d174eed5
...
...
@@ -30,6 +30,15 @@
#include <stdio.h>
#include <stdlib.h>
/* This function provide us access to the original libc free(). This is useful
* for instance to free results obtained by backtrace_symbols(). We need
* to define this function before including zmalloc.h that may shadow the
* free implementation if we use jemalloc or another non standard allocator. */
void
zlibc_free
(
void
*
ptr
)
{
free
(
ptr
);
}
#include <string.h>
#include <pthread.h>
#include "config.h"
...
...
@@ -227,10 +236,6 @@ void zmalloc_enable_thread_safeness(void) {
zmalloc_thread_safe
=
1
;
}
void
zlibc_free
(
void
*
ptr
)
{
free
(
ptr
);
}
/* Get the RSS information in an OS-specific way.
*
* WARNING: the function zmalloc_get_rss() is not designed to be fast
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment