integrate dmalloc.h

This commit is contained in:
Doug MacEachern committed 2005-11-09 18:26:10 +00:00
1 parent 94d3d82aab
commit 100aed0cb3
3 files changed
+16 -2

No files matched your search

+13
View File
@@ -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)))