Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
ae7d5bf6
Unverified
Commit
ae7d5bf6
authored
Feb 24, 2021
by
Yossi Gottlieb
Committed by
GitHub
Feb 24, 2021
Browse files
Use malloc_usable_size() on FreeBSD. (#8545)
parent
e3667cb9
Changes
1
Show whitespace changes
Inline
Side-by-side
src/zmalloc.h
View file @
ae7d5bf6
...
@@ -61,9 +61,12 @@
...
@@ -61,9 +61,12 @@
#define zmalloc_size(p) malloc_size(p)
#define zmalloc_size(p) malloc_size(p)
#endif
#endif
/* On native libc implementations, we should still do our best to provide a
* HAVE_MALLOC_SIZE capability.
*/
#ifndef ZMALLOC_LIB
#ifndef ZMALLOC_LIB
#define ZMALLOC_LIB "libc"
#define ZMALLOC_LIB "libc"
#ifdef
__GLIBC__
#if
def
ined(
__GLIBC__
) || defined(__FreeBSD__)
#include <malloc.h>
#include <malloc.h>
#define HAVE_MALLOC_SIZE 1
#define HAVE_MALLOC_SIZE 1
#define zmalloc_size(p) malloc_usable_size(p)
#define zmalloc_size(p) malloc_usable_size(p)
...
...
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