Is there a way to determine the current maximum heap usage. I want to check in
my application how low free heap became so far to warn if it got too low. Idem
for the stacks. Basically tools like
https://os.mbed.com/docs/mbed-os/v5.14/tutorials/optimizing.html#runtime-memory-statistics
<https://os.mbed.com/docs/mbed-os/v5.14/tutorials/optimizing.html#runtime-memory-statistics>
Thanks,
Mark
PS This gives me the current free heap:
uint16_t heap_free = &__HeapLimit - (char *)_sbrk(0)
For stack I iterate os_task_info_get_next(), giving me oti_stksize and
oti_stkusage.