I am using webserver example.
this example takes lot of heap memory. In the webserver task I am diaplaying free heap memory. as I hit the ip on browser, the web page gets opened but there is lot of heap memory consumption during task execution maybe due to my html code which is am hitting as my web page.
so How to solve this heap memory consumption in my task??
Code: Select all
static void web_server(void *pvParameters)
{
struct netconn *conn, *newconn;
err_t err;
conn = netconn_new(NETCONN_TCP);
netconn_bind(conn, NULL, 80);
netconn_listen(conn);
do {
err = netconn_accept(conn, &newconn);
if (err == ERR_OK) {
vTaskDelay(10);
http_server_netconn_serve(newconn);
netconn_delete(newconn);
}
ESP_LOGI("ss", "MALLOC_CAP_DEFAULT %d", heap_caps_get_free_size(MALLOC_CAP_DEFAULT));
} while(err == ERR_OK);
netconn_close(conn);
netconn_delete(conn);
vTaskDelete(NULL);
}