diff options
| author | John Dyson <dyson@FreeBSD.org> | 1996-12-11 05:20:20 +0000 |
|---|---|---|
| committer | John Dyson <dyson@FreeBSD.org> | 1996-12-11 05:20:20 +0000 |
| commit | 2ae09ad8716384fb7ca9dae3a08c077788d0825d (patch) | |
| tree | eb334771c581fe4a67133d8aca5c32c1f3708990 /usr.bin/cmp/regular.c | |
| parent | b68a757139afff2993c9378648e140f1d829f87f (diff) | |
Notes
Diffstat (limited to 'usr.bin/cmp/regular.c')
| -rw-r--r-- | usr.bin/cmp/regular.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/usr.bin/cmp/regular.c b/usr.bin/cmp/regular.c index 35f62d128dfd..76f23874a77f 100644 --- a/usr.bin/cmp/regular.c +++ b/usr.bin/cmp/regular.c @@ -74,9 +74,12 @@ c_regular(fd1, file1, skip1, len1, fd2, file2, skip2, len2) if ((p1 = (u_char *)mmap(NULL, (size_t)length, PROT_READ, 0, fd1, skip1)) == (u_char *)-1) err(ERR_EXIT, "%s", file1); + + madvise(p1, length, MADV_SEQUENTIAL); if ((p2 = (u_char *)mmap(NULL, (size_t)length, PROT_READ, 0, fd2, skip2)) == (u_char *)-1) err(ERR_EXIT, "%s", file2); + madvise(p2, length, MADV_SEQUENTIAL); dfound = 0; for (byte = line = 1; length--; ++p1, ++p2, ++byte) { |
