Go to file
Jean Sirmai fcc2dd1c6e
include/fsm.h, src/fsm/*: reworked memory management of the logging system
This commits reworks the way that memory is allocated for the logging system.

We basically use a double-linked list, with the oldest and the latest elements
stored in a static variable. Most recent log entries are added at the latest
position in this structure.

A new function to clear and free a log unit has been implemented, and can be used
at many points. We take care that each log unit is freed at closing time.

Also, fsm docs have been a bit clarified.

Tested with valgrind:

==6161== LEAK SUMMARY:
==6161==    definitely lost: 5,008 bytes in 54 blocks
==6161==    indirectly lost: 16,119 bytes in 672 blocks

We can consider that as a basis for future work, as these leaks are due to external
causes (e.g. libraries).

Signed-off-by: Jean Sirmai <jean@a-lec.org>
Signed-off-by: Adrien Bourmault <neox@a-lec.org>
2024-11-20 17:59:09 +01:00
docs src/widget/main_window/design First visible window (with memory leaks) 2024-11-20 17:59:09 +01:00
include include/fsm.h, src/fsm/*: reworked memory management of the logging system 2024-11-20 17:59:09 +01:00
scripts scripts/*: add a script that can list every function name 2024-11-20 17:52:23 +01:00
src include/fsm.h, src/fsm/*: reworked memory management of the logging system 2024-11-20 17:59:09 +01:00
.gitignore docs/*: integrate doxygen, create a documentation zone, adds notes 2024-11-20 17:54:06 +01:00
COPYING src/*, simple Gtk application 2024-11-20 17:38:36 +01:00
Makefile docs/*: integrate doxygen, create a documentation zone, adds notes 2024-11-20 17:54:06 +01:00
manifest.scm src/*, simple Gtk application 2024-11-20 17:38:36 +01:00