[PATCH] mesg.c: make tty variable use only dynamic memory

Harald Becker ralda at gmx.de
Sat Mar 19 11:51:11 UTC 2011


 Hi!

> Excuse me for the dumb question but, isn't expected the system itself
> to free up memory on exit?

Yes, on most Unix like systems. The functionality to free all allocated
memory (and other resources) explicitly is for special purposes.

If an applet is called as no-fork that memory deallocation is essential
to avoid memory leakage. In addition on some no-MMU architectures such
deallocation is required or does help the system in memory organization
and reclaiming strategies (rumors, never had one of those for my own).
Beside this is explicit resource deallocation just good programming
practice and required by code analyzing tools.

--
Harald


More information about the busybox mailing list