1 #ifndef FIO_OS_FREEBSD_H
2 #define FIO_OS_FREEBSD_H
5 #include <sys/sysctl.h>
8 #define FIO_HAVE_POSIXAIO
9 #define FIO_HAVE_ODIRECT
10 #define FIO_USE_GENERIC_RAND
12 #define OS_MAP_ANON MAP_ANON
14 typedef off_t off64_t;
16 static inline int blockdev_size(int fd, unsigned long long *bytes)
20 if (!ioctl(fd, DIOCGMEDIASIZE, &size)) {
29 static inline int blockdev_invalidate_cache(int fd)
34 static inline unsigned long long os_phys_mem(void)
36 int mib[2] = { CTL_HW, HW_PHYSMEM };
37 unsigned long long mem;
38 size_t len = sizeof(mem);
40 sysctl(mib, 2, &mem, &len, NULL, 0);
45 #define FIO_MADV_FREE MADV_FREE