From: "René Scharfe" <rene.scharfe@lsrfire.ath.cx>
To: Felipe Contreras <felipe.contreras@gmail.com>
Cc: git@vger.kernel.org, "Junio C Hamano" <gitster@pobox.com>,
"Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>,
"Adam Spiers" <git@adamspiers.org>,
"Ramkumar Ramachandra" <artagnon@gmail.com>
Subject: Re: [PATCH v3 2/2] read-cache: plug a few leaks
Date: Sun, 09 Jun 2013 04:11:24 +0200 [thread overview]
Message-ID: <51B3E44C.4030304@lsrfire.ath.cx> (raw)
In-Reply-To: <CAMP44s1ffOUd3DkphHAj8ZmovBazPFdMgtvEptR6kW9+ZMLLjA@mail.gmail.com>
Am 08.06.2013 19:27, schrieb Felipe Contreras:
> On Sat, Jun 8, 2013 at 12:22 PM, René Scharfe
> <rene.scharfe@lsrfire.ath.cx> wrote:
>
>> Let's find and fix those leaks by freeing memory in the right places.
>> Freeing memory just in case in places where we can show that no leak is
>> triggered by our test suite doesn't help.
>
> It helps; it prevents leaks. The real culprit is the bogus API, but I
> don't see that changing anytime soon, so there are two options when
> somebody makes a mistake the API allows; leak or don't leak. And you
> seem to prefer the leak, even though it provides absolutely no
> advantage.
It covers up bugs, which may seem helpful, but isn't, because it's
better to fix the actual mistake.
What would be a better API? Making discard_index free the array is a
good first step; what else is bogus?
René
next prev parent reply other threads:[~2013-06-09 2:11 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-07 22:29 [PATCH v3 0/2] cherry-pick: fix memory leaks Felipe Contreras
2013-06-07 22:29 ` [PATCH v3 1/2] unpack-trees: plug a memory leak Felipe Contreras
2013-06-07 22:29 ` [PATCH v3 2/2] read-cache: plug a few leaks Felipe Contreras
2013-06-08 11:32 ` René Scharfe
2013-06-08 12:15 ` Felipe Contreras
2013-06-08 13:22 ` René Scharfe
2013-06-08 14:04 ` Felipe Contreras
2013-06-08 15:56 ` René Scharfe
2013-06-08 16:53 ` Felipe Contreras
2013-06-08 17:22 ` René Scharfe
2013-06-08 17:27 ` Felipe Contreras
2013-06-09 2:11 ` René Scharfe [this message]
2013-06-09 2:25 ` Felipe Contreras
2013-06-09 17:38 ` René Scharfe
2013-06-09 18:27 ` Felipe Contreras
2013-06-09 18:49 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51B3E44C.4030304@lsrfire.ath.cx \
--to=rene.scharfe@lsrfire.ath.cx \
--cc=artagnon@gmail.com \
--cc=felipe.contreras@gmail.com \
--cc=git@adamspiers.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=pclouds@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).