1 Return-Path: <aclements@csail.mit.edu>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 03A16431FBC
\r
6 for <notmuch@notmuchmail.org>; Mon, 6 Oct 2014 06:25:25 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id H0G0NqVMORpg for <notmuch@notmuchmail.org>;
\r
16 Mon, 6 Oct 2014 06:25:20 -0700 (PDT)
\r
17 Received: from outgoing.csail.mit.edu (outgoing.csail.mit.edu [128.30.2.149])
\r
18 by olra.theworths.org (Postfix) with ESMTP id 5C975431FAE
\r
19 for <notmuch@notmuchmail.org>; Mon, 6 Oct 2014 06:25:20 -0700 (PDT)
\r
20 Received: from [104.131.20.129] (helo=awakeningjr)
\r
21 by outgoing.csail.mit.edu with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16)
\r
22 (Exim 4.72) (envelope-from <aclements@csail.mit.edu>)
\r
23 id 1Xb8Ht-0004OY-8x; Mon, 06 Oct 2014 09:25:17 -0400
\r
24 Received: from amthrax by awakeningjr with local (Exim 4.84)
\r
25 (envelope-from <aclements@csail.mit.edu>)
\r
26 id 1Xb8Hs-0000P3-FC; Mon, 06 Oct 2014 09:25:16 -0400
\r
27 Date: Mon, 6 Oct 2014 09:25:16 -0400
\r
28 From: Austin Clements <aclements@csail.mit.edu>
\r
29 To: David Bremner <david@tethera.net>
\r
30 Subject: Re: [PATCH 02/11] lib: Refactor _notmuch_database_link_message
\r
31 Message-ID: <20141006132516.GF7970@csail.mit.edu>
\r
32 References: <1412345958-8278-1-git-send-email-aclements@csail.mit.edu>
\r
33 <1412345958-8278-3-git-send-email-aclements@csail.mit.edu>
\r
34 <87k34fot7d.fsf@maritornes.cs.unb.ca>
\r
35 <20141005232008.GB7970@csail.mit.edu>
\r
36 <871tqlpwcx.fsf@maritornes.cs.unb.ca>
\r
38 Content-Type: text/plain; charset=us-ascii
\r
39 Content-Disposition: inline
\r
40 In-Reply-To: <871tqlpwcx.fsf@maritornes.cs.unb.ca>
\r
41 User-Agent: Mutt/1.5.23 (2014-03-12)
\r
42 Cc: notmuch@notmuchmail.org
\r
43 X-BeenThere: notmuch@notmuchmail.org
\r
44 X-Mailman-Version: 2.1.13
\r
46 List-Id: "Use and development of the notmuch mail system."
\r
47 <notmuch.notmuchmail.org>
\r
48 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
49 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
50 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
51 List-Post: <mailto:notmuch@notmuchmail.org>
\r
52 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
53 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
54 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
55 X-List-Received-Date: Mon, 06 Oct 2014 13:25:26 -0000
\r
57 Quoth David Bremner on Oct 06 at 8:04 am:
\r
58 > Austin Clements <aclements@csail.mit.edu> writes:
\r
60 > > Quoth David Bremner on Oct 05 at 9:45 am:
\r
61 > >> Austin Clements <aclements@csail.mit.edu> writes:
\r
62 > >> > + void *local = talloc_new (NULL);
\r
64 > >> What's the advantage of using a local talloc context here? Is this just
\r
65 > >> an optimization?
\r
67 > > There are a few allocations that wind up going in to this local
\r
68 > > context because of the call to _consume_metadata_thread_id, so it's
\r
69 > > more convenient to free this one context on return from
\r
70 > > _notmuch_database_link_message than to worry about tracking these
\r
71 > > various allocations.
\r
73 > OK, but wouldn't the lazy solution be to use message as a talloc
\r
76 That would be the lazy solution, but it would also leak a bunch of
\r
77 allocations that don't need to live past the end of
\r
78 _notmuch_database_link_message.
\r