-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
radiff2: support comparing files larger than available memory #2338
Comments
how big are those files? On 04/09/2015 02:01 AM, Dāvis wrote:
|
~8 GiB for each file, but I've just 8 GiB RAM and 1 GiB swap, now I increased swap and seems it's working, no error yet. |
Fix it with hardware :) |
this time yeah, but what about comparing 10 TiB files? |
Ask this guy. More seriously, I diffing file in anything else than non-trivial way will require a lot of thinking :) |
Plain byte diffing should not allocate the whole bin in memory. This can be fixed with a loop. But i didnt looked how its done now.
|
Iirc this was alreay done in r2 cmp command, so it should be a 5min fix, if no one does it for me i will take care of this when i have some time
|
I wanted to compare two files of 46G but my system only has 32G memory. My output:
My version:
A more detailed output would be nice. Maybe something like "Not enough memory" :) |
Currently when you attempt to compare files larger than available memory you'll get a very helpful error message
It happens because
r_file_slurp
at radiff2.c#286 tries to allocate memory for whole file which fails and so it returns NULLThe text was updated successfully, but these errors were encountered: