Go to file
Jean Sirmai cb5e3137da
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.

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:12:28 +01:00
data src/*, simple Gtk application 2024-11-01 23:53:24 +01:00
docs docs/rtfm/manual WIP: redaction 2024-11-19 22:36:31 +01:00
include include/fsm.h, src/fsm/*: reworked memory management of the logging system 2024-11-20 17:12:28 +01:00
scripts scripts/*: add a script that can list every function name 2024-11-01 23:54:39 +01:00
src include/fsm.h, src/fsm/*: reworked memory management of the logging system 2024-11-20 17:12:28 +01:00
.gitignore docs/*: integrate doxygen, create a documentation zone, adds notes 2024-11-01 23:54:43 +01:00
COPYING src/*, simple Gtk application 2024-11-01 23:53:24 +01:00
Makefile docs/*: integrate doxygen, create a documentation zone, adds notes 2024-11-01 23:54:43 +01:00
manifest.scm src/*, simple Gtk application 2024-11-01 23:53:24 +01:00