-
Notifications
You must be signed in to change notification settings - Fork 7.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Less memory available for dev since v4.3.x (IDFGH-6233) #7906
Comments
Here are the changes I get with my PR. The "ctrl_size" is the memory used for the allocator control block. Previously, it was the same size for all, so when you had SPIRAM, there was almost 2kB overhead for each. You see below that now each"ctrl_size" is adjusted to the minimum required. So you have 416*3+736+872*2+804=4532 instead of 2168*7=10644 bytes improvement (again if you have SPIRAM, otherwise the largest block would require, I think 872 for control, so 872*7=6104)
|
@SoucheSouche Any update? |
Hi @AxelLin, Yes, the resolution of this issue was merged in the master branch and v4.4. The backports to v5.0 is waiting to be merged as well. |
v4.3 also needs fix. I'm aware v4.3 is in maintenance period, but this bug report clearly says it's impacted since v4.3.x. |
@AlpinProgrammer, @AxelLin, I created a backport to v4.3 including several changes on the heap component affecting the available heap memory. This allows the recovery of ~65% of the loss between v4.2 and v4.3. |
Thanks. |
when running the hello_world example on esp32, we get the following results for available heap memory: release v5.0:
release v4.4:
|
@SoucheSouche |
The fix was merged on our GitLab repo several of days ago. It should be available on Github with the next sync. |
Environment
Problem Description
Hello,
I am posting an issue here because we noticed a significant memory loss when going from using esp-idf-v4.2.2 to using esp-idf-v4.3.1.
Since the v4.3.x seems to add support for the new ESP32-C3, can this explain the loss ?
In order to illustrate the problem, I used the hello world example, adding log to show the memory available.
As you can observe from the logs, there is a 12552 byte loss from
heap_caps_get_free_size(MALLOC_CAP_INTERNAL)
information and a 8580 byte loss from theesp_get_minimum_free_heap_size()
information.Thank you for your help !
Code to reproduce this issue
Using examples/get-started/hello_world, replace
by
Debug Logs
v4.2.2
v4.3.1
The text was updated successfully, but these errors were encountered: