mikrosk / z-tools

Zorro's Tools for Atari/GEM
0 stars 1 forks source link

Codecs not freeing all the ram they allocate #22

Open mikrosk opened 2 years ago

mikrosk commented 2 years ago

Noticed this with jpeg and tiff images. Loading multiple images and then closing the windows causes the memory footprint of zView to continually grow. Can be observed looking in u:\proc or using MemWatch.

Reported by: lpgb

mikrosk commented 2 years ago

Sounds like either a memory leak or maybe just memory fragmentation.

In either case, since that only happens with tiff & jpeg, i guess the used libraries are to blame. That will be hard to fix. Only way i can think of is to trace all calls to malloc/free, and compare them at the end.

Original comment by: thotto

mikrosk commented 2 years ago

Assuming that the used libtiff/libjpeg aren't too old which contained some huge bug I would say that most likely the problem is that the LDG codec isn't calling some release function.

Original comment by: mikrosk

mikrosk commented 2 years ago

With jpeg and tiff the image sizes are much larger making it easier to see. If I push the degas codec hard enough the same thing seems to occur. Don't think it's a case of mismatched malloc/mfree calls, but perhaps how these calls work.

Original comment by: lpgb