[En-Nut-Discussion] r6796 introduced possible memory leak in os/timer.c
Philipp Burch
phip at hb9etc.ch
Sun Jan 17 09:37:03 CET 2021
Hi Uwe!
On 16.01.21 19:54, Uwe Bonnes wrote:
>
> Just a short comment: I feel uneager at all that run-time allocation/ deallocation happens at all.
>
>
Indeed. Especially that timers need heap memory in all kinds of OS
sleeps is not really nice. With the implemented NutTimerHandleStart(),
it would probably be possible to use a single pre-allocated timer
structure per thread. But I don't really feel comfortable with hacking
in the innermost parts of Ethernut.
Considering the change done in r6796: Do you know why tn_flags was
implemented as a uint32_t? Since Ethernut also targets 8-bit platforms,
it seems somewhat inefficient to add a 32-bit value for a single bit to
one of the core OS structures.
Regards,
Philipp
More information about the En-Nut-Discussion
mailing list