No heap available, failed to malloc 1592

nver

No heap available, failed to malloc 1592

Postby nver » Tue Jun 09, 2015 1:30 pm

Hi Espressif,

I have a multi connection TCP server which works great. My problem is that I see No heap available, failed to malloc 1592 from SDK on serial console after using the server for a few seconds.

My TCP server does NOT alloc/free any memory at runtime so I do not suspect a memory leak by the server itself. Looks like the SDK is allocating memory for TCP connections which is not released or reused for some reason. Can you please explain and help resolve this.

Thank you.

ESP_Faye
Posts: 1646
Joined: Mon Oct 27, 2014 11:08 am

Re: No heap available, failed to malloc 1592

Postby ESP_Faye » Tue Jun 09, 2015 6:02 pm

Hi,

Create a TCP connection needs to malloc some buffer, "No heap available" means there is not enough heap to use.

You could provide your test code and we will help you to debug this problem.

Thanks for your interest in ESP8266 !

nver

Re: No heap available, failed to malloc 1592

Postby nver » Wed Jul 15, 2015 2:35 pm

The latest patch for memory optimization http://bbs.espressif.com/viewtopic.php?f=5&t=734 seem to have fixed my issue.

Thanks Espressif.

Who is online

Users browsing this forum: No registered users and 85 guests