BUILD/MINOR: memprof fix macOs build.

this platform has a similar malloc_usable_size too.
This commit is contained in:
David CARLIER 2021-07-20 20:37:45 +01:00 committed by Willy Tarreau
parent 3c032f2d4d
commit 534197c721
1 changed files with 6 additions and 0 deletions

View File

@ -277,6 +277,12 @@ typedef struct { } empty_t;
#include <malloc_np.h>
#endif
/* macOS has a call similar to malloc_usable_size */
#if defined(USE_MEMORY_PROFILING) && defined(__APPLE__)
#include <malloc/malloc.h>
#define malloc_usable_size malloc_size
#endif
/* Max number of file descriptors we send in one sendmsg(). Linux seems to be
* able to send 253 fds per sendmsg(), not sure about the other OSes.
*/