Hello,
The GetMagickMemoryMethods() function in the MagickCore library appears
to be broken. It is supposed to return the addresses of the functions
ImageMagick is using for memory allocation. But the function appears to
be implemented such that it will never work as advertised.
That is because the function is currently defined as:
void GetMagickMemoryMethods(AcquireMemoryHandler acquire_memory_handler,
ResizeMemoryHandler resize_memory_handler,
DestroyMemoryHandler destroy_memory_handler);
The parameters should be _pointers_ to function pointers. In other
words, the prototype should look like this:
void GetMagickMemoryMethods(
AcquireMemoryHandler *acquire_memory_handler,
ResizeMemoryHandler *resize_memory_handler,
DestroyMemoryHandler *destroy_memory_handler);
And the assignments performed in GetMagickMemoryMethods() would
(obviously) look like:
*acquire_memory_handler=memory_methods.acquire_memory_handler;
It seems broken that one can set new memory handlers with
SetMagickMemoryHandlers(), but cannot retrieve the addresses of the
handlers currently being used by IM via GetMagickMemoryHandlers(). I
urge you to consider fixing this issue for version 6.4.2.
Thanks,
Eric Krause
_______________________________________________
Magick-bugs mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-bugs