Allocate-on-flush (also called delayed allocation) is a file system feature implemented in HFS+,[1] XFS, Reiser4, ZFS, Btrfs, and ext4.
[2] The feature also closely resembles an older technique that Berkeley's UFS called "block reallocation".
When blocks must be allocated to hold pending writes, disk space for the appended data is subtracted from the free-space counter, but not actually allocated in the free-space bitmap.
Instead, the appended data are held in memory until they must be flushed to storage due to memory pressure, when the kernel decides to flush dirty buffers, or when the application performs the Unix sync system call, for example.
It can also help in keeping allocations contiguous when there are several files growing at the same time.