0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-22 17:51:53 +00:00

Updated dmalloc bindings

This commit is contained in:
Maria Matejka 2019-08-19 15:03:19 +02:00
parent f638916c32
commit 4e07dc398e

View File

@ -101,9 +101,13 @@ void buffer_realloc(void **buf, unsigned *size, unsigned need, unsigned item_siz
*/ */
#define DMALLOC_DISABLE #define DMALLOC_DISABLE
#include <dmalloc.h> #include <dmalloc.h>
#define xmalloc(size) _xmalloc_leap(__FILE__, __LINE__, size) #define xmalloc(size) \
#define xrealloc(size) _xrealloc_leap(__FILE__, __LINE__, size) dmalloc_malloc(__FILE__, __LINE__, (size), DMALLOC_FUNC_MALLOC, 0, 1)
#define xfree(ptr) _xfree_leap(__FILE__, __LINE__, ptr) #define xrealloc(ptr, size) \
dmalloc_realloc(__FILE__, __LINE__, (ptr), (size), DMALLOC_FUNC_REALLOC, 1)
#define xfree(ptr) \
dmalloc_free(__FILE__, __LINE__, (ptr), DMALLOC_FUNC_FREE)
#else #else
/* /*
* Unfortunately, several libraries we might want to link to define * Unfortunately, several libraries we might want to link to define