/** * HTTPD malloc/free wrappers with debug instrumentation */ #pragma once #include "httpd-logging.h" #include "httpd-platform.h" #if DEBUG_MALLOC void* httpdMalloc_(size_t len, const char * filename, int lineno, const char * funcname); void httpdFree_(void *ptr, const char * filename, int lineno, const char * funcname); #define httpdMalloc(len_) httpdMalloc_((len_), __FILE__, __LINE__, __FUNCTION__) #define httpdFree(ptr_) httpdFree_((ptr_), __FILE__, __LINE__, __FUNCTION__) #else #define httpdMalloc(len, purpose) httpdPlatMalloc((len)) #define httpdFree(ptr) httpdPlatFree((ptr)) #endif