AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
November 2008

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2008.11.26 15:44 "Memory leak opening and closing files?", by Eric Bruneton
2008.11.26 16:54 "Re: Memory leak opening and closing files?", by Frank Warmerdam
2008.11.26 17:13 "Re: Memory leak opening and closing files?", by Bob Friesenhahn
2008.11.27 09:35 "Re: Memory leak opening and closing files?", by Eric Bruneton
2008.11.27 10:22 "Re: Memory leak opening and closing files?", by <jcupitt@gmail.com>

2008.11.26 16:54 "Re: Memory leak opening and closing files?", by Frank Warmerdam

Eric Bruneton wrote:
> Hi,
> 
> the following program shows a constant increase in memory usage, so I 
> suspect a memory leak in the tiff library (using libtiff 3.8.2-1 on 
> Windows):
> 
>     for (int i = 0; i < 1000000; ++i) {
>         TIFF *f = TIFFOpen("test.tiff", "rb");
>         TIFFClose(f);
>     }
> 
> where "test.tiff" is generated with (in fact I observed this behavior 
> with many different test files):

Eric,

I have done a similar test on linux with libtiff 3.8.2 and seen no
signs of leakage either by running for a long time or when using valgrind
on a couple iterations.

This suggests that the problem is either specific to the tif_win32.c
platform specific stuff, or that it is an artifact of heap fragmentation
that isn't really about libtiff.

I don't have good memory leak identification tools for win32, so I'm not
inclined to do the digging on that aspect.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent