Heap Size
-
- Posts: 2
- Joined: Mon Dec 14, 2015 2:07 pm
Re: Heap Size
Postby SaeedKazemi » Sun Jan 03, 2016 7:01 pm
AFAIK the memory is freed after tcp sent.
However you may monitor the free memory using system_get_free_heap_size()
However you may monitor the free memory using system_get_free_heap_size()
Re: Heap Size
Postby vishnu046 » Mon Jan 04, 2016 2:14 pm
Hi i am reading the HEAP size ....
Basically i am running a web server... after each POST operation HEAP size is reducing .... at some point it is getting too low and
application not working...
how we can maintain the HEAP memory...
I am attaching the log please check it....
Basically i am running a web server... after each POST operation HEAP size is reducing .... at some point it is getting too low and
application not working...
how we can maintain the HEAP memory...
I am attaching the log please check it....
Vishnu
-
- Posts: 2
- Joined: Mon Dec 14, 2015 2:07 pm
Re: Heap Size
Postby SaeedKazemi » Mon Jan 04, 2016 9:20 pm
Some checkpoints that may help you:
1. Check if during handling POST request there is explicit memory allocation(os_malloc, os_zalloc) in your web server code and make sure you free them respectively (before return, break ...)
2. Check for probable out of bound memory access (causes subsequent SKD memory management inconsistent)
especially check temp size (it's large as packet length)
3. Check for use of global variables (receive callbacks can be called concurrently and may cause race conditions)
4. Read notes and warning about using SDK APIs available in the documentation.
5. Finally use more verbose debugging info in you code so that you can localize and isolate the code section that causes memory leak.
1. Check if during handling POST request there is explicit memory allocation(os_malloc, os_zalloc) in your web server code and make sure you free them respectively (before return, break ...)
2. Check for probable out of bound memory access (causes subsequent SKD memory management inconsistent)
especially check temp size (it's large as packet length)
3. Check for use of global variables (receive callbacks can be called concurrently and may cause race conditions)
4. Read notes and warning about using SDK APIs available in the documentation.
5. Finally use more verbose debugging info in you code so that you can localize and isolate the code section that causes memory leak.
Who is online
Users browsing this forum: No registered users and 136 guests
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.