Subject: Re: bin/10625: /usr/bin/cmp is unable to compare rather large files
To: None <uklaus@hgb-leipzig.de>
From: Greg A. Woods <woods@weird.com>
List: netbsd-bugs
Date: 07/20/2000 12:10:02
[ On Tuesday, July 18, 2000 at 01:21:35 (-0700), uklaus@hgb-leipzig.de wrote: ]
> Subject: bin/10625: /usr/bin/cmp is unable to compare rather large files
>
> <root@hgb1> ~# ls -lai /wd0/Backup/media48.tar.gz /wd1/Backup/media48.tar.gz 
>    7942 -rw-r--r--  1 root  daemon  1409578717 Jul 12 08:16 /wd0/Backup/media48.tar.gz
> 4551315 -rw-r--r--  1 root  daemon  1409578717 Jul 12 08:16 /wd1/Backup/media48.tar.gz
> <root@hgb1> ~# cmp /wd0/Backup/media48.tar.gz /wd1/Backup/media48.tar.gz 
> cmp: /wd1/Backup/media48.tar.gz: Cannot allocate memory

because of BAD non-unix-like programming practices....

The damn program uses mmap()!

If read() isn't fast enough then something's wrong in the land of *BSD....

(Of course if mmap() is broken and can't handle paging transparently
through any reasonable number of *VERY* large files then something's
very wrong with it too....)

-- 
							Greg A. Woods

+1 416 218-0098      VE3TCP      <gwoods@acm.org>      <robohack!woods>
Planix, Inc. <woods@planix.com>; Secrets of the Weird <woods@weird.com>