More allocation debugging support.
[srvx.git] / src / common.h
index a8458a37db958e7e0ffdeff166589334a55b961d..56928adb356740755d547de5ea41ac3ae583d54e 100644 (file)
@@ -98,6 +98,14 @@ extern void *srvx_malloc(const char *, unsigned int, size_t);
 extern void *srvx_realloc(const char *, unsigned int, void *, size_t);
 extern char *srvx_strdup(const char *, unsigned int, const char *);
 extern void srvx_free(const char *, unsigned int, void *);
+# if !defined(NDEBUG)
+extern void verify(const void *ptr);
+#  define verify(x) verify(x)
+# endif
+#endif
+
+#ifndef verify
+# define verify(ptr) (void)(ptr)
 #endif
 
 extern time_t now;