AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2013.05.21 10:32 "[Tiff] memory management function calls", by Chris Liddell
2013.05.21 14:11 "Re: [Tiff] memory management function calls", by Bob Friesenhahn
2013.05.21 15:11 "Re: [Tiff] memory management function calls", by Chris Liddell
2013.05.21 15:18 "Re: [Tiff] memory management function calls", by Bob Friesenhahn
2013.05.21 15:32 "Re: [Tiff] memory management function calls", by Chris Liddell
2013.05.21 15:38 "Re: [Tiff] memory management function calls", by Bob Friesenhahn
2013.05.21 17:21 "Re: [Tiff] memory management function calls", by Joris Van Damme
2013.05.21 17:28 "Re: [Tiff] memory management function calls", by Chris Liddell

2013.05.21 15:32 "Re: [Tiff] memory management function calls", by Chris Liddell

On Tue, 21 May 2013 10:18:26 -0500 (CDT)

It's not uncommon for applications that implement their own memory management to require a "context" of some kind to be passed to the memory management calls, especially when thread safety is required - hence the "opaque pointer".

Yes, but then standard malloc/realloc/free type functions can not be specified directly. Special wrapper functions would need to be added in order to support passing (and ignoring) the context before calling such functions.

Sure, so the function pointer types for the callbacks would have some kind of context pointer parameter, but the default functions (which would be used by existing callers, and callers not requiring to the hook the memory calls) would simply ignore that parameter.

Rather than debate the ephemeral ad nauseum, I'll put together patch over the next week or so between my other tasks, and post it so there's something concrete to critique. I just wanted to check there would be some interest in it before I devoted the time to it.

Chris