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

David Bird david at coova.com
Mon Mar 8 07:58:46 UTC 2010


What operating system are you using? Yes, most modern operating systems
will clean up the resources of a process when it exits.


On Mon, 2010-03-08 at 16:25 +0900, Masashi Honma wrote:
> (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