-
Notifications
You must be signed in to change notification settings - Fork 15
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
heap-management: Use C memory management APIs #57
Conversation
Couldn't this just set the FreeRTOS heap to heap 3 which wraps malloc and free? |
@archigup Indeed, I've tried to use heap_3 sample implementation. However, it did not work in our case as we would still need the symbols for |
@archigup In addition to issue explained by @AhmedIsmail02, the main driver for the decision to switch to C memory management instead of FreeRTOS memory management is that, the middleware used by the FRI like ml-embedded-evaluation-kit and tflite-micro uses C memory management APIs. In order to use heap_3, the middlewares need to an override of C memory management APIs to call |
b5f3193
to
9e76bd3
Compare
@archigup @chinglee-iot @aggarg |
It was noticed that sometimes speech-recognition application fails on the CI because the OTA update is not completed by the time `timeout-seconds` is reached. Hence, increasing the timeout for test applications job to 45 minutes instead of 30 minutes. Signed-off-by: Ahmed Ismail <[email protected]>
We shouldn't be allocating heap using C and FreeRTOS heap management APIs as we might end up with both FreeRTOS heap and C heap. This can lead to several unexpected issues. C standard heap functions are used to unify heap allocations as we can't use FreeRTOS heap management APIs because this would require patching lots of file as part of ml-embedded-evaluation-kit library which use C standard heap functions for heap allocations. Heap space is increased by `0x10000` as C standard heap management APIs requires more heap space for the existing FRI applications because it is less optimised than FreeRTOS heap management APIS (heap_4). Signed-off-by: Ahmed Ismail <[email protected]>
9e76bd3
to
169d721
Compare
Description
We shouldn't be allocating heap using C and FreeRTOS heap management APIs as we might end up with both FreeRTOS heap and C heap. This can lead to several unexpected issues.
C standard heap functions are used to unify heap allocations as we can't use FreeRTOS heap management APIs because this would require patching lots of file as part of
ml-embedded-evaluation-kit library which use C standard heap functions for heap allocations.
Heap space is increased by
0x10000
as C standard heap management APIs requires more heap space for the existing FRI applications because it is less optimised than FreeRTOS heap management APIS (heap_4).Test Steps
Checklist:
Related Issue
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.