At Tue, 30 Mar 2010 02:48:28 +0100, Thomas Cataldo <tcataldo@xxxxxxxxx> wrote: Subject: Re: [patches] avoid unless exit() > > Relying on exit freeing up memory is pretty lazy as it prevents switching to > threads. That makes no sense at all -- all threads exit when exit() is called. If use of threads causes the code to change so much that exit() will no longer be called at the end of some code path where it is now called then for certain you'll have to be very careful how you write the new code and be certain to also deal appropriately with all the other resources which would otherwise be released by the exit() call. > I'm only a java programmer using cyrus for its webmail need by I think that > fork/leak/leak/exit is a bad programming model. How is that different from the pedantic fork()/malloc()...free()/exit() form? What about all the other resources exit() implicitly releases? You'd better be very pedantic about all of them! Perhaps you should even call sbrk() to be sure the heap is shrunk back down first too (though few malloc() implementations have a safe way to reset themselves to handle this case)! BTW, it's not a "model" per se -- just a simple practice. :-) Unless you're hinting at the larger model of properly using separate processes to manage separate threads of execution..... -- Greg A. Woods +1 416 218-0098 VE3TCP RoboHack <woods@xxxxxxxxxxx> Planix, Inc. <woods@xxxxxxxxxx> Secrets of the Weird <woods@xxxxxxxxx> ---- Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html