Re: Error : Memory allocation failed `No such file or directory'
Ilya Zakharevich <[email protected]> Sat, 14 Mar 2009 08:25:32 +0000 (UTC)
| Newsgroups | gmane.comp.video.image-magick.bugs |
|---|---|
| Organization | U.C. Berkeley Math. Department. |
| Message-ID | <[email protected]> |
[A complimentary Cc of this posting was sent to <[email protected]>], who wrote in article <[email protected]>: > > Could you be more precise, please? > > See http://www.imagemagick.org/script/resources.php and > http://www.imagemagick.org/script/architecture.php. No, it did not explain why These resource limits reduce the large memory (.e.g > 1mb) requests to ensure there is enough memory for the little requests (.e.g. < 1mb) ImageMagick requires. Finally, I spend an hour to read sources. Could one add this to documentation of -limit: ======================================================= Requests for buffers to keep intermediate images are satisfied from one of 3 pools: in-memory pool, memory-mapped files pool, and disk files pool (in this order) depending on the -limit settings. If the total size of allocated buffers in the given pool would reach the corresponding limit, the request is passed to the next pool. Additionally, requests of size "-limit area" or above are never allocated from in-memory pool. In particular, if one has about 400mb of free memory, and wants to avoid swapping by keeping larger requests on disk (thus allowing little requests, e.g., <10mb, to be in memory), use -limit area 10mb -limit memory 400mb For these setting, 1kb=1024b. (To find which requests are performed, use -debug cache, and grep for memory|open|destroy|disk.) ======================================================= Thanks, Ilya