Return-Path: <awaresystems.be+caf_=filtered=awaresystems.be@gmail.com>
Delivered-To: filtered@awaresystems.be
Received: from mx-j.one.com (mx-j.one.com [91.198.169.57])
	by mail6.local (Postfix) with ESMTP id 91C678014FAC3
	for <filtered@awaresystems.be>; Wed,  4 Sep 2013 16:46:04 +0200 (CEST)
X-Virus-Scanned: by one.com
Received-SPF: pass (mx-j: domain of awaresystems.be+caf_=filtered=awaresystems.be@gmail.com designates 209.85.215.48 as permitted sender)
X-Greylist: whitelisted by SQLgrey-1.8.0-rc2
Received: from mail-la0-f48.google.com (mail-la0-f48.google.com [209.85.215.48])
	by mx-j.one.com (Postfix) with ESMTP id 545D4239EB3
	for <filtered@awaresystems.be>; Wed,  4 Sep 2013 14:46:04 +0000 (UTC)
Received: by mail-la0-f48.google.com with SMTP id er20so380322lab.21
        for <filtered@awaresystems.be>; Wed, 04 Sep 2013 07:46:03 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=delivered-to:domainkey-status:delivered-to:date:from:to:in-reply-to
         :message-id:references:user-agent:mime-version:cc:subject:precedence
         :list-id:list-unsubscribe:list-archive:list-post:list-help
         :list-subscribe:content-type:content-transfer-encoding:sender
         :errors-to;
        bh=yWk8dsNOjXzPx0oXkUcgN3gYy5Mp6cQZlYkNHWAXcdA=;
        b=UPN0dkPZu3a95Md0HqcR73YDrpnVsYrjMGYJS1wfNv1TdyFsQrUuvPOdvHLwUwouRT
         MmFgEaPURo1LA1rfO+lrrOeI7juqGRwVIhl2FFGmgV/etiFzVElmDp9q82N6KWeUTbVL
         0SKmysAooy+R5qa7aJC77WWsjt0p4DLSXWej0Ol/QUTMFpazp9se2nH2gIni+rL/BteR
         Uuwm6Udyz4rW3M0YsRgQRLFFtbLGQvKjKO5TutY/qQ0EUss6gBQZFW2GN8dI0fbYL48s
         eROOqgnVvrHTT8W2yKnY0khnsfQ/vPl4i/6gmm+M2mBI5HBHnRhFUbLAom4aDoMkM1Cx
         pEIg==
X-Received: by 10.152.36.98 with SMTP id p2mr2914934laj.14.1378305963899;
        Wed, 04 Sep 2013 07:46:03 -0700 (PDT)
X-Forwarded-To: filtered@awaresystems.be
X-Forwarded-For: awaresystems.be@gmail.com filtered@awaresystems.be
Delivered-To: awaresystems.be@gmail.com
Received: by 10.114.2.237 with SMTP id 13csp217716ldx;
        Wed, 4 Sep 2013 07:46:03 -0700 (PDT)
X-Received: by 10.112.57.49 with SMTP id f17mr2792486lbq.26.1378305962534;
        Wed, 04 Sep 2013 07:46:02 -0700 (PDT)
DomainKey-Status: bad format
Received-SPF: neutral (google.com: 195.47.247.149 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) client-ip=195.47.247.149;
Received: by 10.112.33.69 with POP3 id p5mf245414lbi.38;
        Wed, 04 Sep 2013 07:46:02 -0700 (PDT)
X-Gmail-Fetch-Info: info@awaresystems.be 1 pop.awaresystems.be 110 info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-x.one.com (mx-x.one.com [195.47.247.149])
	by mail6.local (Postfix) with ESMTP id 7CB5D8014FAC3
	for <info@awaresystems.be>; Wed,  4 Sep 2013 16:43:20 +0200 (CEST)
X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0-rc2
Received: from lists.maptools.org (ks365428.kimsufi.com [94.23.4.142])
	by mx-x.one.com (Postfix) with ESMTP id 74706136BC
	for <info@awaresystems.be>; Wed,  4 Sep 2013 14:40:19 +0000 (UTC)
Received: from [10.1.0.241] (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id 3A5EB35C055;
	Wed,  4 Sep 2013 09:41:59 -0500 (EST)
Received: from blade.simplesystems.org (blade.simplesystems.org [65.66.246.74])
	by lists.maptools.org (Postfix) with ESMTPS id 1792135C055
	for <tiff@lists.maptools.org>; Wed,  4 Sep 2013 09:24:15 -0500 (EST)
Received: from freddy.simplesystems.org (freddy.simplesystems.org
	[65.66.246.65])
	by blade.simplesystems.org (8.14.4+Sun/8.14.4) with ESMTP id
	r84EODja012162; Wed, 4 Sep 2013 09:24:13 -0500 (CDT)
Date: Wed, 4 Sep 2013 09:24:13 -0500 (CDT)
From: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
X-X-Sender: bfriesen@freddy.simplesystems.org
To: Chris Liddell <chris.liddell@artifex.com>
In-Reply-To: <52273D1B.9090409@artifex.com>
Message-ID: <alpine.GSO.2.01.1309040912110.2267@freddy.simplesystems.org>
References: <CAGy8pWr-M3oAt34iPaFFpQTKwrbGrQxzt1NKZsQKRLD_c+fYiw@mail.gmail.com>
	<alpine.GSO.2.01.1305210909030.2267@freddy.simplesystems.org>
	<20130521161103.52cedb63@paracelsus>
	<alpine.GSO.2.01.1305211015420.24050@freddy.simplesystems.org>
	<20130521163204.5902e827@paracelsus>
	<20130625121228.0b965ec5@paracelsus>
	<51FB6810.6050307@artifex.com> <52260162.80306@artifex.com>
	<CA+YzLBdtMZtm=PMAQxrJTRy_jRv+XfqMt-LYXxCzdB_heumQKQ@mail.gmail.com>
	<5226E7CB.2050105@artifex.com>
	<alpine.GSO.2.01.1309040845200.2267@freddy.simplesystems.org>
	<52273D1B.9090409@artifex.com>
User-Agent: Alpine 2.01 (GSO 1266 2009-07-14)
MIME-Version: 1.0
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2
	(blade.simplesystems.org [65.66.246.90]);
	Wed, 04 Sep 2013 09:24:13 -0500 (CDT)
Cc: TIFF <tiff@lists.maptools.org>
Subject: Re: [Tiff] memory management function calls
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: TIFF and libtiff discussion <tiff.lists.maptools.org>
List-Unsubscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=unsubscribe>
List-Archive: <http://lists.maptools.org/mailman/private/tiff>
List-Post: <mailto:tiff@lists.maptools.org>
List-Help: <mailto:tiff-request@lists.maptools.org?subject=help>
List-Subscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

On Wed, 4 Sep 2013, Chris Liddell wrote:
>
> I don't have a problem with it being rejected for those reasons, but I was 
> concerned (due to the lack of responses) that referring to a browsable git 
> repo for a first review wasn't liked. I wouldn't like it to be rejected 
> because of that.

Maybe people are not used to such conveniences.  Bear skins and stone 
knives are the norm here. :-)

The main impact of the changes is that it is done by creating a new 
TIFFClientOpen() type interface with additional parameters.  Other 
libraries change the allocator using global variables but the proposed 
change allows the allocator to be changed on an individual open basis. 
This could be used to support multiple threads with zero heap 
contention in the allocator if the allocator is designed to support 
it.

  457 extern TIFF* TIFFClientOpenCTX(const char*, const char*,
  458             thandle_t,
  459             TIFFReadWriteProc, TIFFReadWriteProc,
  460             TIFFSeekProc, TIFFCloseProc,
  461             TIFFSizeProc,
  462             TIFFMapFileProc, TIFFUnmapFileProc,
  463             void *,
  464             TIFFmallocCTXProc, TIFFreallocCTXProc, TIFFfreeCTXProc);

As a result of the approach, the biggest change is to pass the TIFF 
handle where it was never required before and so many lines of code 
are changed.  If malloc/free need to be introduced in new/modified 
code, then the TIFF handle needs to be passed to that code.

There is only benefit to the user if they already used 
TIFFClientOpen() and can easily update to use TIFFClientOpenCTX() or 
are willing to significantly update their code to use TIFFClientOpen() 
type operation.

You already know the above but I post it as benefit for those who did 
not look at your repository.

Bob
-- 
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
