Return-Path: <tiff-bounces@lists.maptools.org>
Delivered-To: info@awaresystems.be
Received: (qmail 23066 invoked from network); 14 Nov 2008 18:38:48 -0000
Received: from cheryl.telenet-ops.be ([195.130.136.3])
          (envelope-sender <tiff-bounces@lists.maptools.org>)
          by angelia.telenet-ops.be (qmail-ldap-1.03) with SMTP
          for <info@awaresystems.be>; 14 Nov 2008 18:38:48 -0000
Received: from zimbu.telenet-ops.be (zimbu.telenet-ops.be [195.130.136.11])
	by cheryl.telenet-ops.be (8.13.1/8.13.1) with ESMTP id mAEIcmCY006820
	for <info@awaresystems.be>; Fri, 14 Nov 2008 19:38:48 +0100
Received: from localhost (localhost.localdomain [127.0.0.1])
	by zimbu.telenet-ops.be (Postfix) with SMTP id 283D340003
	for <info@awaresystems.be>; Fri, 14 Nov 2008 19:38:48 +0100 (CET)
Received: from ladon.telenet-ops.be (ladon.telenet-ops.be [195.130.132.50])
	by zimbu.telenet-ops.be (Postfix) with ESMTP id 221CB40002
	for <info@awaresystems.be>; Fri, 14 Nov 2008 19:38:48 +0100 (CET)
Received: from duke.maptools.org (r153.dmsolutions.ca [209.217.116.153])
	by ladon.telenet-ops.be (Postfix) with ESMTP id D0642312775
	for <info@awaresystems.be>; Fri, 14 Nov 2008 19:38:47 +0100 (CET)
Received: from duke.maptools.org (duke.maptools.org [127.0.0.1])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id mAEIbNfM000534;
	Fri, 14 Nov 2008 13:37:51 -0500
Received: from sender-02.it.helsinki.fi (sender-02.it.helsinki.fi
	[128.214.205.137])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id mAEIbL0n000527
	for <tiff@lists.maptools.org>; Fri, 14 Nov 2008 13:37:21 -0500
Received: from webmail.helsinki.fi (mandragora.it.helsinki.fi
	[128.214.205.113])
	by sender-02.it.helsinki.fi (8.13.8/8.13.8) with ESMTP id
	mAEIbJjj028246; Fri, 14 Nov 2008 20:37:19 +0200
Received: from dsl-tkubrasgw1-ffc8c100-24.dhcp.inet.fi
	(dsl-tkubrasgw1-ffc8c100-24.dhcp.inet.fi [88.193.200.24]) by
	webmail.helsinki.fi (Horde Framework) with HTTP;
	Fri, 14 Nov 2008 20:37:19 +0200
Message-ID: <20081114203719.46681rq6wc3891sv@webmail.helsinki.fi>
Date: Fri, 14 Nov 2008 20:37:19 +0200
From: "Ilkka Korpela" <Ilkka.Korpela@Helsinki.fi>
To: "Bob Friesenhahn" <bfriesen@simple.dallas.tx.us>
Subject: Re: [Tiff] Memory leak (TIFFOpen, TIFFReadTile)?
References: <20081114102912.182940jlte5kpjh4@webmail.helsinki.fi>
	<Pine.SOC.4.64.0811141147180.15560@freddy.simplesystems.org>
In-Reply-To: <Pine.SOC.4.64.0811141147180.15560@freddy.simplesystems.org>
MIME-Version: 1.0
Content-Type: text/plain;
	charset=ISO-8859-1;
	DelSp="Yes";
	format="flowed"
Content-Disposition: inline
User-Agent: Internet Messaging Program (IMP) H3 (4.2)
X-Sender: korpela@mappi.helsinki.fi
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by duke.maptools.org id
	mAEIbL0n000527
Cc: tiff@lists.maptools.org
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.4
Precedence: list
Reply-To: Ilkka.Korpela@Helsinki.fi
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>
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org
X-SpamCatcher-Score: 10 [X]

Quoting "Bob Friesenhahn" <bfriesen@simple.dallas.tx.us>:

Bob

   Thanks. I found a way out of the memory consumption
by calling TIFFClose() and TIFFOpen in between rows of
TILES (inside the double loop). This way the consumption
(leak) stays < 25 MB with these huge images, which is
tolerable. Memory is freed when TIFFClose() is called.

ilkka Salo Finland

>> I tried with _TIFFmalloc() and malloc() but it does not make
>> a difference - memory consumption goes up. Any suggestions out there?
>> Here is the simple code (include statements not there),:
>
> You are running out of memory because your program is using malloc()  
> and realloc().
>
> More seriously, you can't really expect realloc() to work on Windows  
> when it is pushed so close to its arbitrary limits.  There may be  
> more success if you allocate all the memory needed in the first place.
>
> Bob
> ======================================
> Bob Friesenhahn
> bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
> GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
>
>
>



-- 
Ilkka Korpela
http://www.helsinki.fi/~korpela


_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
