Erode Function Memory Limitation

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
AndreaImage
Posts: 6
Joined: 2016-07-27T02:39:49-07:00
Authentication code: 1151

Erode Function Memory Limitation

Post by AndreaImage »

Hi

i'm using ImageMagick to perform the Erode function on a Image
i need to limit the memory used by the process

during erosion process, due to the memory consuption, i can't do anything else (just wait...)

i'm trying to set the policy.xml to use max the 75% of the resource (modifyng the policy.xml file)

but i need some help

my pc has 8Gb of Ram and an HD of 128Gb

Code: Select all

-<policymap>

<!-- <policy domain="resource" name="temporary-path" value="/tmp"/> -->
<!-- <policy domain="resource" name="memory" value="6GiB"/> -->
<!-- <policy domain="resource" name="map" value="6GiB"/> -->
<!-- <policy domain="resource" name="width" value="100MP"/> -->
<!-- <policy domain="resource" name="height" value="100MP"/> -->
<!-- <policy domain="resource" name="area" value="1GB"/> -->
<!-- <policy domain="resource" name="disk" value="16EB"/> -->
<!-- <policy domain="resource" name="file" value="768"/> -->
<!-- <policy domain="resource" name="thread" value="4"/> -->
<!-- <policy domain="resource" name="throttle" value="0"/> -->
<!-- <policy domain="resource" name="time" value="3600"/> -->
<!-- <policy domain="system" name="precision" value="6"/> -->


<policy value="passphrase" name="shared-secret" domain="cache"/>

</policymap>
Someone can suggest which parameter has to be modify?

Thanks
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Erode Function Memory Limitation

Post by snibgo »

I suspect you should un-comment the "memory" and "map" lines, and make both 4GiB or whatever you want.
snibgo's IM pages: im.snibgo.com
AndreaImage
Posts: 6
Joined: 2016-07-27T02:39:49-07:00
Authentication code: 1151

Re: Erode Function Memory Limitation

Post by AndreaImage »

thanks

it is working

which is the difference between "map" and "memory"?

thanks again
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Erode Function Memory Limitation

Post by snibgo »

I'm not sure. The architecture document http://www.imagemagick.org/script/architecture.php says:
memory: maximum amount of memory in bytes to allocate for the pixel cache from the heap.

map: maximum amount of memory map in bytes to allocate for the pixel cache.
snibgo's IM pages: im.snibgo.com
Post Reply