ESP8266 Developer Zone The Official ESP8266 Forum 2016-12-07T14:25:07+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=621 2016-12-07T14:25:07+08:00 2016-12-07T14:25:07+08:00 https://bbs.espressif.com:443/viewtopic.php?t=621&p=10831#p10831 <![CDATA[Re: Memory Fragmentation]]> Statistics: Posted by electronicsguy — Wed Dec 07, 2016 2:25 pm


]]>
2015-11-25T16:44:03+08:00 2015-11-25T16:44:03+08:00 https://bbs.espressif.com:443/viewtopic.php?t=621&p=4765#p4765 <![CDATA[Re: Memory Fragmentation]]>
I ask because my app does dynamic memory allocation to parse incoming data, It receives quite a bit of packets. Randomly I'll get a Fatal Exception which occurs in the pvPortRealloc method. I don't have any code that uses realloc.

My printf traces are:

Disposing Grid
Avaliable - Attepting To Send: 61 bytes - Fatal exception (28):
epc1=0x4010168a
epc2=0x00000000
epc3=0x4010179e
epcvaddr=0x00000000
depc=0x00000000
rtn_add=0x40101511

ets Jan 8 2013,rst cause:2, boot mode:(3,6)


Its attempting to send 61 bytes via espconn_send(); then I get the fatal exception:

epc1 is in the pvPortRealloc Method.
epc3 is in the vPortExitCritical Method.


In previous cases, I've fixed fatal exceptions by reusing memory using memset to clear it, instead of free and malloc'ing a new pointer.

Statistics: Posted by EliteScientist — Wed Nov 25, 2015 4:44 pm


]]>
2015-06-24T01:49:22+08:00 2015-06-24T01:49:22+08:00 https://bbs.espressif.com:443/viewtopic.php?t=621&p=2376#p2376 <![CDATA[Re: Memory Fragmentation]]>
So I'm curios whether there are changes to that manager or not.

Thank you!

Statistics: Posted by HolgerLembke — Wed Jun 24, 2015 1:49 am


]]>
2015-06-23T15:34:47+08:00 2015-06-23T15:34:47+08:00 https://bbs.espressif.com:443/viewtopic.php?t=621&p=2359#p2359 <![CDATA[Re: Memory Fragmentation]]>
Sorry for the misunderstanding..

About memory management we recommended you to use esp_iot_rtos_sdk which using freeRTOS https://github.com/espressif/esp_iot_rtos_sdk, source code of memory management is \esp_iot_rtos_sdk-master\third_party\freertos\heap_4.c

Thanks for your interest in ESP8266 !

Statistics: Posted by ESP_Faye — Tue Jun 23, 2015 3:34 pm


]]>
2015-06-18T15:04:30+08:00 2015-06-18T15:04:30+08:00 https://bbs.espressif.com:443/viewtopic.php?t=621&p=2313#p2313 <![CDATA[Re: Memory Fragmentation]]>
Are there informations available about how memory management works internally?

Statistics: Posted by HolgerLembke — Thu Jun 18, 2015 3:04 pm


]]>
2015-06-18T11:06:19+08:00 2015-06-18T11:06:19+08:00 https://bbs.espressif.com:443/viewtopic.php?t=621&p=2305#p2305 <![CDATA[Re: Memory Fragmentation]]>
Please using "os_malloc" which is same as "malloc", you can refer to IOT_Demo

Thanks for your interest in ESP8266 !

Statistics: Posted by ESP_Faye — Thu Jun 18, 2015 11:06 am


]]>
2015-06-18T01:18:42+08:00 2015-06-18T01:18:42+08:00 https://bbs.espressif.com:443/viewtopic.php?t=621&p=2292#p2292 <![CDATA[Memory Fragmentation]]>
I'm currently investigation the effects of memory fragmentation on the heap.

As far as I see, there is no documentation about pvPortMalloc() and the structures how the free list is managed.

Is there any way to get these details?

Statistics: Posted by HolgerLembke — Thu Jun 18, 2015 1:18 am


]]>