[FL-2432], [FL-2487] Rework bt keys load and save (#1139)
* bt keys: rework load and save with saved_struct * bt: rename bt keys storage functions * furi_hal_nfc: allow context switch during emilation * bt settings: rework with saved struct * infrared: replace file worker with dialogs and storage * Core, Loader: fix thread allocation tracking, much better, so wow. Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
@@ -171,7 +171,16 @@ size_t memmgr_heap_get_thread_memory(osThreadId_t thread_id) {
|
||||
!MemmgrHeapAllocDict_end_p(alloc_dict_it);
|
||||
MemmgrHeapAllocDict_next(alloc_dict_it)) {
|
||||
MemmgrHeapAllocDict_itref_t* data = MemmgrHeapAllocDict_ref(alloc_dict_it);
|
||||
leftovers += data->value;
|
||||
if(data->key != 0) {
|
||||
uint8_t* puc = (uint8_t*)data->key;
|
||||
puc -= xHeapStructSize;
|
||||
BlockLink_t* pxLink = (void*)puc;
|
||||
|
||||
if((pxLink->xBlockSize & xBlockAllocatedBit) != 0 &&
|
||||
pxLink->pxNextFreeBlock == NULL) {
|
||||
leftovers += data->value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
memmgr_heap_thread_trace_depth--;
|
||||
|
@@ -45,6 +45,7 @@ static void furi_thread_body(void* context) {
|
||||
thread->ret = thread->callback(thread->context);
|
||||
|
||||
if(thread->heap_trace_enabled == true) {
|
||||
osDelay(33);
|
||||
thread->heap_size = memmgr_heap_get_thread_memory(thread_id);
|
||||
memmgr_heap_disable_thread_trace(thread_id);
|
||||
}
|
||||
|
Reference in New Issue
Block a user