[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:
@@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user