An RMagick user is reporting significantly larger memory usage when running on a 64-bit server vs. a 32-bit server. I believe these are both Intel machines running some flavor of Linux. The method that appears to be sucking up all the memory is ImageToBlob. With a 2000x1000 image in GIF format, the ImageToBlob method uses 2 1/2 times as much memory on the 64-bit machine. The user has configured ImageMagick to use QuantumDepth=8 on both machines.
While I would expect some small change just to account for 64-bit pointers, I would guess that the common quantum depth would make the image roughly the same size.
Do you have any insight into this problem? Any questions I should ask the user to help understand the problem?
ImageToBlob memory usage 32bit vs. 64bit
Re: ImageToBlob memory usage 32bit vs. 64bit
A quantum depth of 8 produces the same size pixel cache on a 32 or 64-bit OS. Unsigned long arrays consume twice as much memory on a 64-bit OS compared to that of a 32-bit system. We suspect the extra memory is consumed by the color reduction algorithm that utilizes unsigned long and long double arrays.
Re: ImageToBlob memory usage 32bit vs. 64bit
Thanks for your answer. I'll pass this info onto the user.
Re: ImageToBlob memory usage 32bit vs. 64bit
Actually I am the "user". What I find a little weird: When you save the image to disk (instead of doinf to_blob) it does not consume the memory?!
Logically?
Till
Logically?
Till