AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2006.10.25 08:48 "[Tiff] Newbie Question on Memory Usage within LibTiff", by Amarnath S
2006.10.25 09:21 "Re: [Tiff] Newbie Question on Memory Usage within LibTiff", by Joris
2006.10.25 15:33 "Re: [Tiff] Newbie Question on Memory Usage within LibTiff", by Edward Lam
2006.10.25 11:49 "Re: [Tiff] Newbie Question on Memory Usage within LibTiff", by Gerben Vos
2006.10.25 16:00 "Re: [Tiff] Newbie Question on Memory Usage within LibTiff", by Bob Friesenhahn

2006.10.25 11:49 "Re: [Tiff] Newbie Question on Memory Usage within LibTiff", by Gerben Vos

At the line marked AAAA in the
code, the memory usage was 1404 K, whereas at BBBB, it was 1516 K (as
monitored on the Windows Task Manager); this means that there is a memory
leak somewhere.

No.

Released memory usually isn't immediately returned to the operating system. It is marked as free within the process itself, but remains allocated to the process. Therefore it will not show up as free memory in the task manager.

There are ways of avoiding this by using memory-mapped files, or by allocating memory directly from the operating system. For most programs these are not necessary, but libtiff allows you to replace its allocation routines (see tif_win32.c or tif_unix.c) for purposes such as this. Forget about it unless you have real problems.

Gerben Vos.