Return-Path: <tiff-bounces@lists.maptools.org>
Received: from inas026.isp.belgacom.be (localhost [127.0.0.1])
        by inav007.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-AV-3.00) with ESMTP id k1DGEl0g016563
        for <joris.at.lebbeke@skynet.be>; Mon, 13 Feb 2006 17:14:49 +0100
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from inmx008.isp.belgacom.be (inmx008.isp.belgacom.be [195.238.5.88])
        by inas026.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-AS-2.03) with ESMTP id k1DGEcW4024404
        for <joris.at.lebbeke@skynet.be>; Mon, 13 Feb 2006 17:14:41 +0100
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from duke.maptools.org (r153.dmsolutions.ca [209.217.116.153] (may be forged))
        by inmx008.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-2.32) with ESMTP id k1DGET0f008711
        for <joris.at.lebbeke@skynet.be>; Mon, 13 Feb 2006 17:14:30 +0100
        (envelope-from <tiff-bounces@lists.maptools.org>)
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 k1DG5w60000428;
	Mon, 13 Feb 2006 11:06:26 -0500
Received: from scooby.simplesystems.org (scooby.simplesystems.org
	[65.66.246.67])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id k1DG5q18000425
	for <tiff@lists.maptools.org>; Mon, 13 Feb 2006 11:05:53 -0500
Received: from blade.simplesystems.org (blade.simplesystems.org [65.66.246.74])
	by scooby.simplesystems.org (8.12.10+Sun/8.12.10) with ESMTP id
	k1DG5ous006064; Mon, 13 Feb 2006 10:05:50 -0600 (CST)
Date: Mon, 13 Feb 2006 10:05:50 -0600 (CST)
From: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
X-X-Sender: bfriesen@blade.simplesystems.org
To: Thierry Pierron <t.pierron@polkadots.ca>
Subject: Re: [Tiff] Memory leak in TIFFOpen on Win32 ?
In-Reply-To: <8b913ac778ed0becbfb6779f857ac0db@polkadots.ca>
Message-ID: <Pine.SOC.4.60.0602131002160.10345@blade.simplesystems.org>
References: <8b913ac778ed0becbfb6779f857ac0db@polkadots.ca>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
Cc: tiff@lists.maptools.org
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.4
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>
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org
X-UIDL: 000000000023ceae.000012e2
X-MSP-STORE: Mon, 13 Feb 2006 17:14:51 +0100
Status:   

There are two different I/O subsystems which work in the Windows 
build.  Besides the tif_win32 module, the tif_unix module may be used 
under Windows.  The leak may be I/O subsystem related so it is 
particular to the Windows platform.  Which one of these does the 
GnuWin32 libtiff use?

tif_win32=libtiff/tif_win32.c
tif_unix=libtiff/tif_unix.c

Bob

On Mon, 13 Feb 2006, Thierry Pierron wrote:

> Hi all,
>
> Just try the following code :
>
> #include <stdio.h>
> #include <tiffio.h>
>
> int main(int argc, char *argv[])
> {
> 	int i;
>
> 	for (i = 10; i > 0; i --)
> 	{
> 		printf("Starting in %d ...\r", i); fflush(stdout);
> 		sleep(1);
> 	}
>
> 	for (i = 0; i < 10000; i ++)
> 	{
> 		TIFF * in = TIFFOpen("cyan.tif", "r");
> 		if (in) TIFFClose(in);
> 	}
> 	sleep(20);
> 	return 0;
> }
>
> What I notice is that memory usage increased without going down at any 
> moment. I'm using GnuWin32 v3.8.0 self-installer package on Windows 2000, and 
> compiled this test with MinGW. The test file can be downloaded from 
> http://216.113.38.184/download/cyan.tif   (3.9M). This is a 10800x13200 8bits 
> monochrome tiled TIFF file, compressed with deflate method and which was 
> generated by libTIFF itself (v3.7.3).
>
> I also run this test on Linux and Mac OS X, with sources downloaded from ftp, 
> and have not seen any problem.
>
> Does someone else notice that strange side effect ?
> -- 
> Thierry Pierron
> Polkadots Software Inc.
> 2501 Dollard
> Lasalle, QC
> H8N 1S2 Canada
>
>
> _______________________________________________
> Tiff mailing list: Tiff@lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/tiff
> http://www.remotesensing.org/libtiff/
>

======================================
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/
