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.27 09:35 "Re: Memory leak opening and closing files?", by Eric Bruneton

Bob Friesenhahn wrote:
> On Wed, 26 Nov 2008, Eric Bruneton wrote:
> 
>> 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);
>>    }
> 
> Libtiff is open source software.  Once you have isolated the problem, 
> please send a patch to correct it.

I haven't found it. However I found that when compiling the libtiff code 
together with my application code in a single executable (i.e. without 
using a separate static library for libtiff), then the problem 
disappears. So it might be due to fragmentation, but I don't understand 
why this fragmentation occurs in one case but not in the other. The 
problem is that I'm not sure I used the same compilation options than 
for the precompiled library (I configured the tif_config.h and tifconf.h 
manually since I don't have nmake, autoconf, etc - I'm using MinGW)

Eric