Page 1 of 1

memory allocation hint

Posted: 2007-12-26T16:27:14-07:00
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.

Re: memory allocation hint

Posted: 2007-12-26T20:50:55-07:00
by magick
See 'Cache Storage and Resource Requirements' here: http://www.imagemagick.org/script/archi ... .php#cache .

Re: memory allocation hint

Posted: 2007-12-27T23:10:37-07:00
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.

Re: memory allocation hint

Posted: 2007-12-28T07:35:12-07:00
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.