[Chilli] [PATCH] Fix: Memory leak of opt_run()

Masashi Honma honma at ictec.co.jp
Mon Mar 8 07:25:30 UTC 2010


(2010/03/08 15:33), David Bird wrote:
> I believe you are thinking that the following would leak memory:
>
> int main() { malloc(1); }

Yes.

> It does, of course, but who cares as the process is terminating (and,
> yes, that does clean up all it's memory).

Can I understand that you believe that "operating systems cleans up all
memories malloc()ed by process at the end of the process" ? I think there
is such a operating system. But I think not all operating systems can do
that. And it is hard for developer who aim to port the CoovaChilli to
new platform to research the operating system behavior. So I think OS
independent code is better.

Regards,
Masashi Honma.


More information about the Chilli mailing list