integrate dmalloc.h
This commit is contained in:
1 parent
94d3d82aab
commit
100aed0cb3
3 files changed
+16
-2
No files matched your search
@@ -12,6 +12,10 @@
|
||||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
#ifdef DMALLOC
|
||||
#include <dmalloc.h>
|
||||
#endif
|
||||
|
||||
/* common to all os sigar_t's */
|
||||
/* XXX: this is ugly; but don't want the same stuffs
|
||||
* duplicated on 4 platforms and am too lazy to change
|
||||
@@ -40,6 +44,15 @@
|
||||
# define SIGAR_INLINE
|
||||
#endif
|
||||
|
||||
#ifdef DMALLOC
|
||||
/* linux has its own strdup macro, make sure we use dmalloc's */
|
||||
#define sigar_strdup(s) \
|
||||
dmalloc_strdup(__FILE__, __LINE__, s, 0);
|
||||
#else
|
||||
#define sigar_strdup(s) \
|
||||
strdup(s)
|
||||
#endif
|
||||
|
||||
#define SIGAR_ZERO(s) \
|
||||
memset(s, '\0', sizeof(*(s)))
|
||||
|
||||
|
||||
Reference in new issue
Block a user