barton_lv
2009-11-18 09:02:46 UTC
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
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