1
0
mirror of https://github.com/lammertb/libhttp.git synced 2026-01-03 16:02:30 +03:00

MEMORY_DEBUGGING variables

Isolate variables used for the memory debugging
This commit is contained in:
hansipie
2015-07-09 01:12:09 +02:00
parent 730b7df221
commit 7fd2ea80a8

View File

@@ -432,15 +432,19 @@ static char *read_conn(struct mg_connection *conn, int *size)
return data;
}
#ifdef MEMORY_DEBUGGING
extern unsigned long mg_memory_debug_blockCount;
extern unsigned long mg_memory_debug_totalMemUsed;
#endif
static void ut_mg_stop(struct mg_context *ctx)
{
/* mg_stop for unit_test */
mg_stop(ctx);
#ifdef MEMORY_DEBUGGING
ASSERT(mg_memory_debug_blockCount == 0);
ASSERT(mg_memory_debug_totalMemUsed == 0);
#endif
mg_sleep(
31000); /* This is required to ensure the operating system already
allows to use the port again */