Roberto,

you can fix the maximum read size with the -r parameter on the command
line. By default, recoverjpeg uses 128M of memory. Try to run it with
"-r 32M" to use 32M of RAM.

recoverjpeg doesn't leak memory. It does only one single malloc() in
main(), not in a loop, and no function is ever called recursively.

Using mmap() as you suggest is not an option as it would not work on
some BSD systems which do not allow to mmap() a block device. On
GNU/Linux systems, there was no performance gain in using a mmap()ed
file anyway as the data is only read() once and then buffered internally
(in the buffer configurable with -r as discussed above).

  Sam

PS/ Cyril, would you be kind enough to send me a copy of bug reports you
    receive for recoverjpeg? I stumbled on this one by chance only.
-- 
Samuel Tardieu -- [EMAIL PROTECTED] -- http://www.rfc1149.net/


Reply via email to