Page 1 of 1

Memory allocation failed even if memory is not exhausted

Posted: 2007-05-31T00:00:40-07:00
by oyvind.eide
I am running convert on a computer with the following settings for memory usage:

> convert -list resource
File Area Memory Map Disk
------------------------------------------------
192 64gb 48gb 256gb 4eb

The image USD_UIO_2713046.tif is 2584x3981 pixels. The following command is OK:

> convert -resize 2584x3981 USD_UIO_2713046.tif temp.jpg

But trying to resize to anything smaller gives a memory allocation failed error:

> convert -debug Resource -resize 1000x1000 USD_UIO_2713046.tif temp.jpg
2007-05-31T08:52:38+02:00 0:22 20.490u 6.2.9 Resource convert[22158]: resource.c/unknown/216/Resource
Area: 78.4828mb/78.4828mb/64gb
2007-05-31T08:52:38+02:00 0:22 20.490u 6.2.9 Resource convert[22158]: resource.c/unknown/216/Resource
Memory: 78.4828mb/78.4828mb/48gb
2007-05-31T08:52:42+02:00 0:26 24.540u 6.2.9 Resource convert[22158]: resource.c/unknown/216/Resource
Area: 4.95148mb/4.95148mb/64gb
2007-05-31T08:52:42+02:00 0:26 24.540u 6.2.9 Resource convert[22158]: resource.c/unknown/216/Resource
Memory: 4.95148mb/83.4343mb/48gb
convert: Memory allocation failed `Not enough space'.
>

There is plenty of memory and temp disc space free.

The input image can be found at:

http://folk.uio.no/oeide/USD_UIO_2713046.tif

Version info:

Solaris
Machine hardware: sun4u
OS version: 5.8
Processor type: sparc
Hardware: SUNW,Sun-Fire-880

> convert --version
Version: ImageMagick 6.2.9 09/15/06 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2006 ImageMagick Studio LLC


--

Regards,

Øyvind Eide

Re: Memory allocation failed even if memory is not exhausted

Posted: 2007-05-31T07:46:07-07:00
by magick
We tried your command with the latest release, 6.3.4-4, and it worked without complaint. In regards to memory, ImageMagick controls the amount of memory it consumes but has no control over any delegate library. Its possible the memory allocation exception occurs within the TIFF library.

Re: Memory allocation failed even if memory is not exhausted

Posted: 2007-06-01T04:15:41-07:00
by oyvind.eide
Thank you for answering so quickly, I will try upgrading and see if that helps.


--

Regards,

Øyvind Eide