$ convert -resize x64 s1.svg s1.gif
s1.svg looks like this:
Code: Select all
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 124 30">
<defs>
<style type="text/css"><![CDATA[
#background {
fill: black;
}
]]></style>
</defs>
<path id="background" d="M0,0h124v30h-124z"/>
</svg>
Code: Select all
...
fstat(3, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
mmap(NULL, 134221824, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff4f3c58000
futex(0x738d24, FUTEX_WAKE_PRIVATE, 2147483647) = 0
...
Code: Select all
length=(size_t) (1UL << (4*(8-CacheShift)));
cube_info->memory_info=AcquireVirtualMemory(length,sizeof(*cube_info->cache));
The purpose of the application is to convert two differing SVGs into GIFs and then stitch them together as an animated GIF for web display. The problem is that the memory being used by this process is causing the OS to OOM kill processes due to the memory requirement when multiple converts run simultaneously.
Is there any reason why GIF needs such a huge amount of memory for what works out to be a 5k GIF file?
Surely the dither resources (the memory allocation in GetCubeInfo) should be related to the size of the source file?
Setting resource limitations either in the call or via shell environment doesn't help. They are ignored.
Environment: debian Jessie (3.16.39-1+deb8u2)
ImageMagick: v7.0.6 (compiled and run on host)
I've also tried this on RedHat using packages and got the same result.