2013.05.21 14:11 "Re: [Tiff] memory management function calls", by Bob Friesenhahn
I'm a developer working on Ghostscript, and we use libtiff for our TIFF output "devices".
As a matter policy (primarily for easy porting), it's our policy that, wherever possible, libraries we include should be integrated in such a way that they work through Ghostcript's I/O and memory management functions.
I made changes to how we interface with libtiff a while back so the file I/O functions work that way, but looking at the memory management functions, there is no way this can currently be done, due to memory management functions always being called directly (rather than via function pointers, like the file I/O calls), and also there is no "context" passed into the memory functions.
If I were to make changes that would augment the libtiff API to allow an opaque pointer to "user data" to be passed into the memory functions, and changed the memory functions to be called through function pointers like the file I/O ones, would that be something of interest, and likely to be adopted?
I am not so sure about the extra "opaque pointer" bit, but having the ability to specify the memory allocation functions to use (as zlib and libpng do) would be useful.
A key issue is that the existing libtiff ABI can't be impacted by any such change.
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/