On a ESP-CAM module with external RAM this allocation fails
p= calloc(80, 240);
This smaller request works ok:
p= calloc(60, 240);
But these functions report that there's sufficient heap space available:
xPortGetFreeHeapSize(): 3456208
heap_caps_get_largest_free_block(MALLOC_CAP_8BIT): 3426256
Why does calloc fail even when there's enough RAM available?
Is there a workaround available?
I am using: ESP-IDF v3.3-beta2-18-g0f927791b-dirty
calloc fails even when free heap is large enough
Re: calloc fails even when free heap is large enough
Check options in menuconfig about how psram should be added to heap, because not always memory can be with calloc.
Also try to use:
Also try to use:
Code: Select all
heap_caps_malloc(..., MALLOC_CAP_SPIRAM)
Re: calloc fails even when free heap is large enough
That did it !
Thank you very much.
Thank you very much.
Who is online
Users browsing this forum: No registered users and 146 guests