BUILD: compat: include malloc_np.h for USE_MEMORY_PROFILING on FreeBSD

This include is needed for malloc_usable_size(). It's also important to
think about disabling global pools.
This commit is contained in:
Willy Tarreau 2021-05-09 23:46:45 +02:00
parent 4a75328485
commit 9bc457f0ea
1 changed files with 5 additions and 0 deletions

View File

@ -272,6 +272,11 @@ typedef struct { } empty_t;
#define HA_HAVE_FAST_MALLOC
#endif
/* FreeBSD also has malloc_usable_size() but it requires malloc_np.h */
#if defined(USE_MEMORY_PROFILING) && defined(__FreeBSD__) && (__FreeBSD_version >= 700002)
#include <malloc_np.h>
#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.
*/