Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id C5F01431FB6 for ; Sun, 5 Oct 2014 16:20:18 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.3 X-Spam-Level: X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wEFeMyPTomFy for ; Sun, 5 Oct 2014 16:20:13 -0700 (PDT) Received: from outgoing.csail.mit.edu (outgoing.csail.mit.edu [128.30.2.149]) by olra.theworths.org (Postfix) with ESMTP id 49C6C431FAE for ; Sun, 5 Oct 2014 16:20:13 -0700 (PDT) Received: from [104.131.20.129] (helo=awakeningjr) by outgoing.csail.mit.edu with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1Xav61-0000LQ-4R; Sun, 05 Oct 2014 19:20:09 -0400 Received: from amthrax by awakeningjr with local (Exim 4.84) (envelope-from ) id 1Xav60-0004dB-LS; Sun, 05 Oct 2014 19:20:08 -0400 Date: Sun, 5 Oct 2014 19:20:08 -0400 From: Austin Clements To: David Bremner Subject: Re: [PATCH 02/11] lib: Refactor _notmuch_database_link_message Message-ID: <20141005232008.GB7970@csail.mit.edu> References: <1412345958-8278-1-git-send-email-aclements@csail.mit.edu> <1412345958-8278-3-git-send-email-aclements@csail.mit.edu> <87k34fot7d.fsf@maritornes.cs.unb.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87k34fot7d.fsf@maritornes.cs.unb.ca> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: notmuch@notmuchmail.org X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Oct 2014 23:20:18 -0000 Quoth David Bremner on Oct 05 at 9:45 am: > Austin Clements writes: > > + void *local = talloc_new (NULL); > > What's the advantage of using a local talloc context here? Is this just > an optimization? There are a few allocations that wind up going in to this local context because of the call to _consume_metadata_thread_id, so it's more convenient to free this one context on return from _notmuch_database_link_message than to worry about tracking these various allocations.