[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200712061402.53850.rusty@rustcorp.com.au>
Date: Thu, 6 Dec 2007 14:02:53 +1100
From: Rusty Russell <rusty@...tcorp.com.au>
To: Tejun Heo <htejun@...il.com>
Cc: WANG Cong <xiyou.wangcong@...il.com>, sam@...nborg.org,
Linux Kernel <linux-kernel@...r.kernel.org>,
notting@...hat.com, kay.sievers@...y.org, greg@...ah.com
Subject: Re: [PATCH] kbuild: implement modules.order
On Wednesday 05 December 2007 18:11:49 Tejun Heo wrote:
> WANG Cong wrote:
> >>> I think, you forgot to free(3) the memory you calloc(3)'ed and
> >>> malloc(3)'ed above.
> >>
> >> It's a simple program where whole body is in main(). Why bother?
> >> What's the benefit of adding hash-table iterating free logic?
> >
> > Personally, I think memory leaks are bugs. And we hate bugs. ;)
>
> Trust me. As a person buried alive in bug reports, I hate bugs too. I
> just don't agree that this type of programs should free all its
> resources before exiting. How about adding a comment saying /* we're
> going out anyway, don't bother freeing hashtable */?
I too once battled with the moral dilemma of freeing in programs that exit.
Then in 2001, I was moving out of a house which was to be demolished. The
landlord insisted that we pay for the carpets to be cleaned. My wife still
uses it as a canonical example of wasteful idiocy.
So I hope this has contributed to your enlightenment, as it did to mine.
Rusty.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists