1
mirror of https://github.com/DarkFlippers/unleashed-firmware.git synced 2025-12-12 12:42:30 +04:00

Code cleanup: srand, PVS warnings (#1974)

* Remove srand invocation

* PVS High priority fixes

* PVS High errors part 2

* Furi: heap tracing inheritance

* Furi add __builtin_unreachable to furi_thread_catch
This commit is contained in:
あく
2022-11-06 00:07:24 +09:00
committed by GitHub
parent 04e50c9f89
commit e8913f2e33
37 changed files with 76 additions and 85 deletions

View File

@@ -150,8 +150,7 @@ void memmgr_heap_disable_thread_trace(FuriThreadId thread_id) {
vTaskSuspendAll();
{
memmgr_heap_thread_trace_depth++;
furi_check(MemmgrHeapThreadDict_get(memmgr_heap_thread_dict, (uint32_t)thread_id) != NULL);
MemmgrHeapThreadDict_erase(memmgr_heap_thread_dict, (uint32_t)thread_id);
furi_check(MemmgrHeapThreadDict_erase(memmgr_heap_thread_dict, (uint32_t)thread_id));
memmgr_heap_thread_trace_depth--;
}
(void)xTaskResumeAll();
@@ -212,7 +211,8 @@ static inline void traceFREE(void* pointer, size_t size) {
MemmgrHeapAllocDict_t* alloc_dict =
MemmgrHeapThreadDict_get(memmgr_heap_thread_dict, (uint32_t)thread_id);
if(alloc_dict) {
MemmgrHeapAllocDict_erase(*alloc_dict, (uint32_t)pointer);
// In some cases thread may want to release memory that was not allocated by it
(void)MemmgrHeapAllocDict_erase(*alloc_dict, (uint32_t)pointer);
}
memmgr_heap_thread_trace_depth--;
}