Document that units of MAGICK_MEMORY_LIMIT is in megabytes

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
jn0101
Posts: 40
Joined: 2007-06-16T01:36:07-07:00

Document that units of MAGICK_MEMORY_LIMIT is in megabytes

Post by jn0101 »

The usage of MAGICK_MAP_LIMIT, MAGICK_MEMORY_LIMIT, MAGICK_DISK_LIMIT and MAGICK_MAP_LIMIT environtment variables are not working as a normal user would expect.

Please correct page http://www.imagemagick.org/script/resou ... nvironment and state that the units is always in megabytes.

Here is a (what I believe typical) user scenaro.
This user (me :-)) already had biiiig problems using MAGICK_MEMORY_LIMIT correctly and had therefore found out about the identify -list resource command:
[j@jacobnordfalk ~]$ identify -list resource
File Area Memory Map Disk
------------------------------------------------
768 3.96094gb 2.9707gb 7.92188gb 4eb
I would like to limit memory to 100000 bytes, so I naturally write:
[j@jacobnordfalk ~]$ export MAGICK_MEMORY_LIMIT=100000
But this gives:
[j@jacobnordfalk ~]$ identify -list resource
File Area Memory Map Disk
------------------------------------------------
768 3.96094gb 97.6562gb 7.92188gb 4eb
that is, 100GB, a factor 1000000 of the expected!!!


If I then tries to use the units shown, to limit to e.g. 5gb:
[j@jacobnordfalk ~]$ export MAGICK_MEMORY_LIMIT=5gb
the unit is ignored and I get a limit of 5 megabytes:
[j@jacobnordfalk ~]$ identify -list resource
File Area Memory Map Disk
------------------------------------------------
768 3.96094gb 5mb 7.92188gb 4eb

I can live with that the unit is ignored, but please, save us a lot of time and state in http://www.imagemagick.org/script/resou ... nvironment that the units is always in megabytes


Thanks!
Jacob
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Document that units of MAGICK_MEMORY_LIMIT is in megabytes

Post by magick »

We have a patch in ImageMagick 6.3.7-3 Beta to support units (e.g. 3gb).
Post Reply