MICROPY_MALLOC_USES_ALLOCATED_SIZE question

My project uses OPENMV4P. When I enable the two macros MICROPY_MALLOC_USES_ALLOCATED_SIZE and MICROPY_MEM_STATS, the function void m_free(void *ptr) in the py_image.c file remains as a single-parameter function, but the function in the malloc.c file has been changed to void m_free(void *ptr, size_t num_bytes).

You’d need to modify the code. If you are modifying the firmware this is something we’re you have to fix compile issues.

Stats requires passing the size of the allocation to free, which the code doesn’t do.

Will this be optimized in the future?

No, we have no need for stats or allocated size, and can’t go through all the files to support it.