On 2 July 2013 15:50, Galos, David <galos...@students.rowan.edu> wrote: >> I'm failing to see the problem with loading everything into memory. > > If the next step is "write that to a temp file" there is a big > problem. There's nothing wrong with the present tempfile approach.
Yes there is. It wastes read/writes on my hard drive, is slower than in-memory reading, adds overhead of file operations, and also depends on having a non-read only filesystem to write too. > It's reasonably fast I want faster. >it's completely portable (so no crazy getrlimit or /proc reading). Strace >shows that that's how 'sed -i' works. How would in memory storage incur any /proc reading? > If on any system other than linux, I would consider loading into ram, > but because of memory overcommit, malloc never fails, the whole system > crawls to a halt, and the oom killer takes 20 minutes to put > everything back together. No thanks. Okay so you are discussing a problem with your version of unix and malloc, not with the tool sponge. Calvin