2013.09.04 07:02 "Re: [Tiff] memory management function calls", by Chris Liddell
On 03/09/13 17:00, Bob Friesenhahn wrote:
Not even a complaint about putting up the patch in an unfavoured form?
I'd expected to be berated for something by now!
Deafening silence continues........
Sorry for our silence. I have not looked at your changes.
By allowing the libtiff memory allocator to be changed did you forward the request to libjpeg, zlib, libjbig, and libxz?
If not, did you test what happens if the libtiff memory allocator is not compatible with the default one used by the add-on libraries?
I reviewed the source, and I couldn't find anywhere that libtiff assumed that the third party lib used the same memory manager (for example, libtiff freed memory allocated by the "sub-library"). So there should be no dire consequences of the sub-library using a different memory manager. Although, I was on a long haul flight at the time, so it is something I would repeat before committing the code.
At least libjpeg doesn't current support this kind of memory manager hook, and I suspect only zlib currently does.
Obviously, my primary interest is Ghostscript's use, and we only require zlib, but I'm happy to look at making the changes to the other libs *if* the devs are willing to accept them. libjpeg is already on my list.....
The way I've implemented the code, unless the caller changes how libtiff is called nothing will (should?!) change.