posix_fallocate(3) Library Functions Manual posix_fallocate(3) posix_fallocate - (libc -lc) #include int posix_fallocate(int fd, off_t offset, off_t size); glibc ( feature_test_macros(7)): posix_fallocate(): _POSIX_C_SOURCE >= 200112L posix_fallocate() fd offset size . posix_fallocate() . offset+size . posix_fallocate() . errno . EBADF fd . EFBIG offset+size . EINTR . EINVAL offset 0 size 0 . ENODEV fd . ENOSPC fd. EOPNOTSUPP fd . C musl libc. ESPIPE fd . attributes(7). +----------------------+------------------------------------+----------+ | | | | +----------------------+------------------------------------+----------+ |posix_fallocate() | | | | | | | | | | ( | | | | | | | | ) | +----------------------+------------------------------------+----------+ POSIX.1-2008. glibc 2.1.94. POSIX.1-2001 POSIX.1-2008 EINVAL size 0 offset 0. POSIX.1-2001 EINVAL size 0 offset 0 size . glibc posix_fallocate() fallocate(2) . fallocate(2) : o . o . o . o fd O_APPEND O_WRONLY EBADF. . fallocate(2) . EOPNOTSUPP glibc. fallocate(1) fallocate(2) lseek(2) posix_fadvise(2) 3 . . : . 6.18 8 2026 posix_fallocate(3)