Memory Fragmentation
-
- Posts: 3
- Joined: Thu Jun 18, 2015 1:13 am
Memory Fragmentation
Postby HolgerLembke » Thu Jun 18, 2015 1:18 am
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?
-
- Posts: 3
- Joined: Thu Jun 18, 2015 1:13 am
Re: Memory Fragmentation
Postby HolgerLembke » Thu Jun 18, 2015 3:04 pm
Are there informations available about how memory management works internally?
Re: Memory Fragmentation
Postby ESP_Faye » Tue Jun 23, 2015 3:34 pm
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 !
-
- Posts: 3
- Joined: Thu Jun 18, 2015 1:13 am
Re: Memory Fragmentation
Postby HolgerLembke » Wed Jun 24, 2015 1:49 am
So I'm curios whether there are changes to that manager or not.
Thank you!
-
- Posts: 10
- Joined: Sat Nov 21, 2015 5:08 pm
Re: Memory Fragmentation
Postby EliteScientist » Wed Nov 25, 2015 4:44 pm
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.
-
- Posts: 7
- Joined: Mon Jun 22, 2015 1:10 pm
Re: Memory Fragmentation
Postby electronicsguy » Wed Dec 07, 2016 2:25 pm
Who is online
Users browsing this forum: No registered users and 57 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.