Re: [patches] avoid unless exit()

2010-03-30 Thread Greg A. Woods
At Tue, 30 Mar 2010 02:48:28 +0100, Thomas Cataldo 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 c

Re: [patches] avoid unless exit()

2010-03-29 Thread Thomas Cataldo
On Tue, Mar 30, 2010 at 12:04 AM, Greg A. Woods wrote: > > A memory leak is memory consumption by a computer program where the > program is unable to release memory it has acquired. > > On a code path that definitively always ends with exit(2), all memory > is, by definition, released. Therefore t

Re: [patches] avoid unless exit()

2010-03-29 Thread Greg A. Woods
At Sun, 28 Mar 2010 22:19:16 +0200, Gabor Gombas wrote: Subject: Re: [patches] avoid unless exit() > > On Fri, Mar 26, 2010 at 12:01:01PM -0400, Greg A. Woods wrote: > > > on "return" paths, perhaps, but not exit() paths -- there is no leak on > > exit() :-) >

Re: [patches] avoid unless exit()

2010-03-28 Thread Gabor Gombas
On Fri, Mar 26, 2010 at 12:01:01PM -0400, Greg A. Woods wrote: > on "return" paths, perhaps, but not exit() paths -- there is no leak on > exit() :-) The leak of course happens much before exit(). But memory profilers report unfreed memory after the process exits, and there is definite difference

Re: [patches] avoid unless exit()

2010-03-26 Thread Greg A. Woods
At Fri, 26 Mar 2010 07:15:07 +0100, Gabor Gombas wrote: Subject: Re: [patches] avoid unless exit() > > On Thu, Mar 25, 2010 at 10:30:42AM -0400, Greg A. Woods wrote: > > > > indeed, and memory "frees" itself at exit time too, and calling free() a > > whole l

Re: [patches] avoid unless exit()

2010-03-25 Thread Gabor Gombas
On Thu, Mar 25, 2010 at 10:30:42AM -0400, Greg A. Woods wrote: > indeed, and memory "frees" itself at exit time too, and calling free() a > whole lot of times on a sure path to exit() is a pedantic waste of time > and code (and thus maintenance). OTOH properly releasing memory on exit paths makes

Re: [patches] avoid unless exit()

2010-03-25 Thread Greg A. Woods
At Thu, 25 Mar 2010 21:56:26 +1100, Bron Gondwana wrote: Subject: Re: [patches] avoid unless exit() > > On Tue, Mar 23, 2010 at 11:28:57AM +0100, Gonéri Le Bouder wrote: > > Hi, > > > > On AIX 5.3 (20CPU/96GB), the cost of process restart is very expensive. >