dte test coverage


Directory: ./
File: src/util/xadvise.c
Date: 2025-11-12 12:04:10
Coverage Exec Excl Total
Lines: 100.0% 3 0 3
Functions: 100.0% 1 0 1
Branches: -% 0 0 0

Line Branch Exec Source
1 #include "build-defs.h"
2 #include <sys/mman.h>
3 #include "xadvise.h"
4 #include "debug.h"
5
6 1 int advise_sequential(void *addr, size_t len)
7 {
8 1 BUG_ON(len == 0);
9
10 #if HAVE_POSIX_MADVISE
11 1 return posix_madvise(addr, len, POSIX_MADV_SEQUENTIAL);
12 #else
13 (void)addr;
14 #endif
15
16 // "The posix_madvise() function shall have no effect on the semantics
17 // of access to memory in the specified range, although it may affect
18 // the performance of access". Ergo, doing nothing is a valid fallback.
19 return 0;
20 }
21