Esp32 Crashing using heap_caps_get_largest_free_block()

qheinal
Posts: 25
Joined: Tue Feb 20, 2024 4:38 pm

Esp32 Crashing using heap_caps_get_largest_free_block()

Postby qheinal » Wed Feb 28, 2024 4:45 pm

using heap_caps_get_largest_free_block(MALLOC_CAP_8BIT) anywhere else except Setup() causes the mcu to Reset. Im trying to get information on the largest free block before i use malloc. Its important because the function its in buffer size can vary and i want to have the latest information from the heap to either use malloc or throw an error if memory is not enough for operation. So is there an alternative because im calling this from a function in a header file.

Who is online

Users browsing this forum: MicroController and 73 guests