AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2008.11.24 19:40 "[Tiff] TIFFWriteScanline corrupts buffer when compression with predication is enabled", by William B Thompson
2008.11.26 15:44 "[Tiff] Memory leak opening and closing files?", by Eric Bruneton
2008.11.26 16:54 "Re: [Tiff] Memory leak opening and closing files?", by Frank Warmerdam
2008.11.26 17:13 "Re: [Tiff] Memory leak opening and closing files?", by Bob Friesenhahn
2008.11.27 09:35 "Re: [Tiff] Memory leak opening and closing files?", by Eric Bruneton
2008.11.27 10:22 "Re: [Tiff] Memory leak opening and closing files?", by

2008.11.27 09:35 "Re: [Tiff] Memory leak opening and closing files?", by Eric Bruneton

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