memory allocation hint

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
nicolas1

memory allocation hint

Post by nicolas1 »

Is it possible to provide a hint to IM memory manager where to allocate buffer: in RAM or in chunk file on HDD? How it can be done?
For example, it could be valuable, when I have source image (possibly large), which is decoded and stored on as chunk file on HDD and other image objects, produced by applying "AffineTransform" and resize functions on source image. Operation s on produced images usually need to run faster in order to make faster display bits on raster device.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: memory allocation hint

Post by magick »

See 'Cache Storage and Resource Requirements' here: http://www.imagemagick.org/script/archi ... .php#cache .
nicolas1

Re: memory allocation hint

Post by nicolas1 »

Function "AllocateImage" takes only "ImageInfo" as parameter. But is it possible to provide for "AllocateImage" hint, as parameter, where it is better to be allocated: RAM, memory map file, other method?
I see currently there is no such option, but it could be very useful.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: memory allocation hint

Post by magick »

If you read the document we suggested you will see there is a SetMagickResourceLimit() method that you can use for setting pixel cache hints.
Post Reply