Discussion:
a memory problem on Linux-redhat-AS5
barton_lv
2009-11-18 09:02:46 UTC
Permalink
I met a problem about ImageMagick on redhat-AS5 but not found on readhat-AS4.

I use ImageMagick++ to process amount of images with multiple threads on AS5. But I found that the program consumes amount of virtual memory. Every thread will consume about 100M-170M, and fastly the program will dump due to memory deficiency. And this do not happen on AS4. I am very anxious. Can you help me£¿

My program is very simple as the attached.
the main process of every thread is like this:

int MakePic(...)
{
......
Blob *blob = new Blob(buf, bytes);
Image *image = new Image(*blob);
image->quality(80);
image->depth(4);
image->zoom(Geometry(100, 202)); //this call will lead amount of memory consuming

image->write(&outblob);
printf("length=%d\n", outblob.length());
delete image;
delete blob;
......
}


Thank you!

2009-11-18



barton_lv From china
d***@imagemagick.org
2009-11-18 13:14:14 UTC
Permalink
this call will lead amount of memory consumption
Set this environment variable:

export MAGICK_AREA_LIMIT=1mb

That should help with the memory requirements. If you suspect a memory leak,
try a recent version of ImageMagick (the latest is 6.5.7-8).
barton_lv
2009-11-19 02:07:01 UTC
Permalink
Thanks!

I make a test, MAGICK_AREA_LIMIT does not has an effect.
I found the main difference between AS4 and AS5 is:
In AS5, if the thread does not exit, then the memory used by "Image::zoom" does not free. But AS4 does.
Perhaps ImageMagick does not accord with all the the versions of pthread library


2009-11-19



barton_lv



发件人: duc.sequere.aut.de.via.decede
发送时间: 2009-11-18 21:05:25
收件人: barton_lv; magick-bugs
抄送:
主题: Re: [Magick-bugs] a memory problem on Linux-redhat-AS5
this call will lead amount of memory consumption
Set this environment variable:
export MAGICK_AREA_LIMIT=1mb
That should help with the memory requirements. If you suspect a memory leak,
try a recent version of ImageMagick (the latest is 6.5.7-8).
_______________________________________________
Magick-bugs mailing list
Magick-***@imagemagick.org
http://studio.imagemagick.org/mailman/listinfo/magick-bugs

Continue reading on narkive:
Loading...