Skip to content

Commit f70f94d

Browse files
committed
use posix_fadvise instead of posix_fadvise64
1 parent 24cc321 commit f70f94d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llama.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -841,8 +841,8 @@ struct llama_mmap {
841841
// prefetch/readahead impairs performance on NUMA systems
842842
if (numa) { prefetch = 0; }
843843
#ifdef __linux__
844-
if (posix_fadvise64(fd, 0, file->size, POSIX_FADV_SEQUENTIAL)) {
845-
fprintf(stderr, "warning: fadvise(.., POSIX_FADV_SEQUENTIAL) failed: %s\n",
844+
if (posix_fadvise(fd, 0, 0, POSIX_FADV_SEQUENTIAL)) {
845+
fprintf(stderr, "warning: posix_fadvise(.., POSIX_FADV_SEQUENTIAL) failed: %s\n",
846846
strerror(errno));
847847
}
848848
if (prefetch) { flags |= MAP_POPULATE; }

0 commit comments

Comments
 (0)