Regarding the ImageMagick memory handlers.  The MagickCore API
provides a method to assign your own memory handlers if desired.
In the mean-time to reduce memory consumption you can set the
memory and memory-mapped resource limits to force pixels for large
images to disk.  This is of course slower but it stops any one
process from consuming too much of the limited memory resource.
We do this for the ImageMagick web interface, for example, at
http://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi.

In the mean-time we have investigated returning memory from the system
with anonymous memory mapping.  It's easy enough to do but it does
slow down ImageMagick a bit because anonymous memory mapping is zeroed
whereas heap memory is not.  The embeddable memory methods are capable
of returning memory to the system when a free block is coalesced and
all segments in the coalesced free block are unused.  Unfortuately we
have not implemented on this option just yet, although it would be just
a few lines of code.
_______________________________________________
Magick-developers mailing list
Magick-developers@imagemagick.org
http://studio.imagemagick.org/mailman/listinfo/magick-developers

Reply via email to