Samuel Tardieu wrote: > 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).
What about using mmap() as default and falling back to read() on systems or devices where mmap() is no available? Prueba el correo Terra ( http://www.terra.es/correo ); Seguro, rĂ¡pido, fiable.