get largest free block

esmaxness
Posts: 6
Joined: Fri May 27, 2022 12:16 pm

get largest free block

Postby esmaxness » Wed Jul 13, 2022 6:24 am

Hello,

I have an app that uses BLE and WiFi. I required to allocate a large free block (size=115200). However, when I call to heap_caps_get_largest_free_block(MALLOC_CAP_DMA | MALLOC_CAP_32BIT)) I see that there is not enough largest free block memory (free size=110592). What could I do to free heap memory in order to get the suitable large free block?

␛[0;32mI (7378) hagl_esp_mipi: Largest (MALLOC_CAP_DMA | MALLOC_CAP_32BIT) block before init: 110592␛[0m
␛[0;32mI (7378) hagl_esp_mipi: Size required: 115200␛[0m
␛[0;31mE (7388) hagl_esp_mipi: NO BUFFER 1␛[0m
␛[0;32mI (7388) hagl_esp_mipi: Largest (MALLOC_CAP_DMA | MALLOC_CAP_32BIT) block after init: 110592␛[0m
Heap summary for capabilities 0x0000000A:
At 0x3ffb6388 len 7288 free 168 allocated 5496 min_free 168
largest_free_block 0 alloc_blocks 41 free_blocks 0 total_blocks 41
At 0x3ffb9a20 len 16648 free 176 allocated 14848 min_free 48
largest_free_block 68 alloc_blocks 25 free_blocks 1 total_blocks 26
At 0x3ffcaa30 len 87504 free 76360 allocated 9520 min_free 76360
largest_free_block 75776 alloc_blocks 6 free_blocks 1 total_blocks 7
At 0x3ffe0440 len 15072 free 13448 allocated 0 min_free 13448
largest_free_block 13312 alloc_blocks 0 free_blocks 1 total_blocks 1
At 0x3ffe4350 len 113840 free 112216 allocated 0 min_free 112216
largest_free_block 110592 alloc_blocks 0 free_blocks 1 total_blocks 1
Totals:
free 202368 allocated 29864 min_free 202240 largest_free_block 110592

Regards,
David

Who is online

Users browsing this forum: No registered users and 135 guests