bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: diff: memory exhausted


From: Michael Elizabeth Chastain
Subject: Re: diff: memory exhausted
Date: Fri, 12 Dec 2003 03:27:50 -0500 (EST)

This looks reasonable.  Your system has 112 megabytes of free memory
and 80 megabytes of swap, and you want to diff 2 * 200 megabytes of
data.

I know three things you can try:

  diff -H
    heuristic to find small changes in large files

  split(1) on each input file and then diff the splits:
    mkdir z1 z2
    cd z1 ; split ../file1 ; cd ..
    cd z2 ; split ../file2 ; cd ..
    diff -r z1 z2

  add more swap space:
    dd if=/dev/zero of=/some.file.system/foo.swap bs=1048576 count=512
    mkswap /some.file.system/foo.swap
    swapon /some.file.system/foo.swap

I've never had success with "diff -H".

The "split" strategy works the best for me, but requires a bit of
finesse to read the results.

The "swapon" takes a long, long time because "diff" will thrash the
swap space.  But you might as well try it if you are curious.

Hope this helps,

Michael C
GDB QA Guy




reply via email to

[Prev in Thread] Current Thread [Next in Thread]