From the man page:
fflush () forces all user space to write buffered data for a given data stream or update stream through the stream, the main write function.
The specified write function tells the operating system what the contents of the file should be. At this point, all changes will be stored in the file system caches before they are mapped to disk.
POSIX fsync()
. , FlushFileBuffers
Windows.