2008.11.14 18:37 "Re: [Tiff] Memory leak (TIFFOpen, TIFFReadTile)?", by Ilkka Korpela
Quoting "Bob Friesenhahn" <email@example.com>:
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.