Search found 5 matches

by sthivaios
Fri Aug 21, 2026 1:06 pm
Forum: ESP-IDF
Topic: esp_http_client appears to cause a memory leak in RTOS task
Replies: 14
Views: 107

Re: esp_http_client appears to cause a memory leak in RTOS task


At this point I think the best approach is to make a bug report on github. There your problem will be seen by much more people from Espressif and they can have a look at the IDF code. I think it's recommendable that you assume the bug is in your code, but really, IDF is big and really, there are ...
by sthivaios
Fri Aug 21, 2026 12:58 pm
Forum: ESP-IDF
Topic: esp_http_client appears to cause a memory leak in RTOS task
Replies: 14
Views: 107

Re: esp_http_client appears to cause a memory leak in RTOS task


Yeah indeed. I suspect the bug is in the esp_http_client code (as well).



At this point, I have 100% confirmed that what is causing this leak is this function, since in the task's code, when I comment out the line with the call to fetch_schedule_from_alim() the leak stops completely and the ...
by sthivaios
Thu Aug 20, 2026 5:21 pm
Forum: ESP-IDF
Topic: esp_http_client appears to cause a memory leak in RTOS task
Replies: 14
Views: 107

Re: esp_http_client appears to cause a memory leak in RTOS task


And it's not heap fragmentation? In that case the amount of memory "lost" should increase slower over time.



I mean the only thing that could've been doing that in this case was me using malloc() in the task but I removed that call and its just a static buffer now, so there shouldn't be ...
by sthivaios
Thu Aug 20, 2026 1:34 am
Forum: ESP-IDF
Topic: esp_http_client appears to cause a memory leak in RTOS task
Replies: 14
Views: 107

Re: esp_http_client appears to cause a memory leak in RTOS task


I don't see any issues with the code. What you might see is TCP stack housekeeping, i.e. sockets that are held onto after closing them in case more packets appear (or the other side hasn't properly closed them yet). Do you also see the drop happen if you run the loop, say, 50 instead of 4 times ...
by sthivaios
Wed Aug 19, 2026 6:13 pm
Forum: ESP-IDF
Topic: esp_http_client appears to cause a memory leak in RTOS task
Replies: 14
Views: 107

esp_http_client appears to cause a memory leak in RTOS task

Hello all, it's my first time posting here. Hope you are doing well.

I'm writing some firmware for a project, which has to make an HTTP GET request to a server, to get a JSON response. Of course, to do that, I'm using the esp_http_client.

This function (void fetch_schedule_from_alim), is called ...

Go to advanced search