dte test coverage


Directory: ./
File: src/util/xadvise.c
Date: 2025-07-03 15:44:24
Exec Total Coverage
Lines: 3 3 100.0%
Functions: 1 1 100.0%
Branches: 0 0 -%

Line Branch Exec Source
1 #include "feature.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