SpriteHTTPD - embedded HTTP server with read-only filesystem and templating, originally developed for ESP8266, now stand-alone and POSIX compatible.
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.
 
 
spritehttpd/spritehttpd/src/httpd-heap.c

27 lines
583 B

/**
* Malloc instrumentation
*/
#include "httpd-heap.h"
#include "httpd-logging.h"
#include <stddef.h>
#if DEBUG_MALLOC
void* httpdMalloc_(size_t len, const char * filename, int lineno, const char * funcname)
{
void *ptr = httpdPlatMalloc(len);
mem_dbg("%s:%d %s - malloc [%lu] @ %p",
filename, lineno, funcname,
len, ptr);
return ptr;
}
void httpdFree_(void *ptr, const char * filename, int lineno, const char * funcname)
{
mem_dbg("%s:%d %s - free @ %p",
filename, lineno, funcname, ptr);
httpdPlatFree(ptr);
}
#endif