You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
622 B
22 lines
622 B
/**
|
|
* 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
|
|
|