<s>
Allocate-on-flush	B-Application
(	O
also	O
called	O
delayed	B-Application
allocation	I-Application
)	O
is	O
a	O
file	B-Application
system	I-Application
feature	O
implemented	O
in	O
HFS+	B-Application
,	O
XFS	B-Application
,	O
Reiser4	B-Application
,	O
ZFS	B-Application
,	O
Btrfs	B-Operating_System
,	O
and	O
ext4	B-Application
.	O
</s>
<s>
The	O
feature	O
also	O
closely	O
resembles	O
an	O
older	O
technique	O
that	O
Berkeley	O
's	O
UFS	B-Operating_System
called	O
"	O
block	O
reallocation	O
"	O
.	O
</s>
<s>
When	O
blocks	O
must	O
be	O
allocated	O
to	O
hold	O
pending	O
writes	O
,	O
disk	O
space	O
for	O
the	O
appended	O
data	O
is	O
subtracted	O
from	O
the	O
free-space	O
counter	O
,	O
but	O
not	O
actually	O
allocated	O
in	O
the	O
free-space	B-Application
bitmap	I-Application
.	O
</s>
<s>
Instead	O
,	O
the	O
appended	O
data	O
are	O
held	O
in	O
memory	O
until	O
they	O
must	O
be	O
flushed	O
to	O
storage	O
due	O
to	O
memory	O
pressure	O
,	O
when	O
the	O
kernel	O
decides	O
to	O
flush	O
dirty	O
buffers	O
,	O
or	O
when	O
the	O
application	O
performs	O
the	O
Unix	O
sync	B-Language
system	O
call	O
,	O
for	O
example	O
.	O
</s>
<s>
Such	O
delayed	O
processing	O
reduces	O
CPU	O
usage	O
,	O
and	O
tends	O
to	O
reduce	O
disk	O
fragmentation	B-Architecture
,	O
especially	O
for	O
files	O
which	O
grow	O
slowly	O
.	O
</s>
<s>
When	O
used	O
in	O
conjunction	O
with	O
copy	B-Language
on	I-Language
write	I-Language
as	O
it	O
is	O
in	O
ZFS	B-Application
,	O
it	O
can	O
convert	O
slow	O
random	O
writes	O
into	O
fast	O
sequential	O
writes	O
.	O
</s>
