[FL-1326] Move heap4 allocator to furi core and add allocation tracing capability (#529)

* Move heap memory allocator to furi core
* Newlibc: add malloc guards
* Furi: add cmsis thread id getter
* Core: add tracing capability to heap allocator. Add heap tracing support to furi thread. Add heap trace support to app-loader.
This commit is contained in:
あく
2021-06-23 17:48:44 +03:00
committed by GitHub
parent 6ec9c6cc49
commit 359bbdfe69
10 changed files with 600 additions and 33 deletions

View File

@@ -7,6 +7,8 @@
#include <stdio.h>
#include <string.h>
#include <m-dict.h>
#include "FreeRTOS.h"
#include "task.h"
extern UART_HandleTypeDef DEBUG_UART;
@@ -122,3 +124,11 @@ bool furi_stdglue_set_thread_stdout_callback(FuriStdglueWriteCallback callback)
return false;
}
}
void __malloc_lock(struct _reent* REENT) {
vTaskSuspendAll();
}
void __malloc_unlock(struct _reent* REENT) {
xTaskResumeAll();
}