iButton fix data layout (#953)

* ibutton: fix info and delete scenes layout
* loader: fix incorrect heap allocation memory calc
* ibutton: cleanup
This commit is contained in:
gornekich
2022-01-11 20:45:49 +03:00
committed by GitHub
parent c77c6c30a2
commit 1d31000516
3 changed files with 28 additions and 17 deletions

View File

@@ -217,9 +217,11 @@ static void loader_thread_state_callback(FuriThreadState thread_state, void* con
LoaderEvent event;
if(thread_state == FuriThreadStateRunning) {
instance->free_heap_size = memmgr_get_free_heap();
event.type = LoaderEventTypeApplicationStarted;
furi_pubsub_publish(loader_instance->pubsub, &event);
// Snapshot current memory usage
instance->free_heap_size = memmgr_get_free_heap();
} else if(thread_state == FuriThreadStateStopped) {
/*
* Current Leak Sanitizer assumes that memory is allocated and freed
@@ -240,6 +242,7 @@ static void loader_thread_state_callback(FuriThreadState thread_state, void* con
furi_thread_get_heap_size(instance->thread));
furi_hal_power_insomnia_exit();
loader_unlock(instance);
event.type = LoaderEventTypeApplicationStopped;
furi_pubsub_publish(loader_instance->pubsub, &event);
}