<s>
Memory	B-General_Concept
pools	I-General_Concept
,	O
also	O
called	O
fixed-size	O
blocks	O
allocation	O
,	O
is	O
the	O
use	O
of	O
pools	B-General_Concept
for	O
memory	B-General_Concept
management	I-General_Concept
that	O
allows	O
dynamic	B-General_Concept
memory	I-General_Concept
allocation	I-General_Concept
comparable	O
to	O
malloc	B-Language
or	O
C++'s	O
operator	B-Language
new	I-Language
.	O
</s>
<s>
As	O
those	O
implementations	O
suffer	O
from	O
fragmentation	B-Architecture
because	O
of	O
variable	O
block	O
sizes	O
,	O
it	O
is	O
not	O
recommendable	O
to	O
use	O
them	O
in	O
a	O
real	B-General_Concept
time	I-General_Concept
system	I-General_Concept
due	O
to	O
performance	O
.	O
</s>
<s>
A	O
more	O
efficient	O
solution	O
is	O
preallocating	O
a	O
number	O
of	O
memory	O
blocks	O
with	O
the	O
same	O
size	O
called	O
the	O
memory	B-General_Concept
pool	I-General_Concept
.	O
</s>
<s>
The	O
application	O
can	O
allocate	O
,	O
access	O
,	O
and	O
free	O
blocks	O
represented	O
by	O
handles	O
at	O
run	B-Library
time	I-Library
.	O
</s>
<s>
Many	O
real-time	O
operating	O
systems	O
use	O
memory	B-General_Concept
pools	I-General_Concept
,	O
such	O
as	O
the	O
Transaction	B-Operating_System
Processing	I-Operating_System
Facility	I-Operating_System
.	O
</s>
<s>
Some	O
systems	O
,	O
like	O
the	O
web	O
server	O
Nginx	B-Operating_System
,	O
use	O
the	O
term	O
memory	B-General_Concept
pool	I-General_Concept
to	O
refer	O
to	O
a	O
group	O
of	O
variable-size	O
allocations	O
which	O
can	O
be	O
later	O
deallocated	O
all	O
at	O
once	O
.	O
</s>
<s>
This	O
is	O
also	O
known	O
as	O
a	O
region	O
;	O
see	O
region-based	B-General_Concept
memory	I-General_Concept
management	I-General_Concept
.	O
</s>
<s>
A	O
simple	O
memory	B-General_Concept
pool	I-General_Concept
module	O
can	O
allocate	O
,	O
for	O
example	O
,	O
three	O
pools	B-General_Concept
at	O
compile	B-Application
time	I-Application
with	O
block	O
sizes	O
optimized	O
for	O
the	O
application	O
deploying	O
the	O
module	O
.	O
</s>
<s>
Allocate	O
memory	O
from	O
the	O
pools	B-General_Concept
.	O
</s>
<s>
Memory	B-General_Concept
pools	I-General_Concept
allow	O
memory	B-General_Concept
allocation	I-General_Concept
with	O
constant	O
execution	B-Library
time	I-Library
.	O
</s>
<s>
The	O
memory	O
release	O
for	O
thousands	O
of	O
objects	O
in	O
a	O
pool	O
is	O
just	O
one	O
operation	O
,	O
not	O
one	O
by	O
one	O
if	O
malloc	B-Language
is	O
used	O
to	O
allocate	O
memory	O
for	O
each	O
object	O
.	O
</s>
<s>
Memory	B-General_Concept
pools	I-General_Concept
can	O
be	O
grouped	O
in	O
hierarchical	O
tree	O
structures	O
,	O
which	O
is	O
suitable	O
for	O
special	O
programming	O
structures	O
like	O
loops	O
and	O
recursions	O
.	O
</s>
<s>
Fixed-size	O
block	O
memory	B-General_Concept
pools	I-General_Concept
do	O
not	O
need	O
to	O
store	O
allocation	O
metadata	O
for	O
each	O
allocation	O
,	O
describing	O
characteristics	O
like	O
the	O
size	O
of	O
the	O
allocated	O
block	O
.	O
</s>
<s>
Allows	O
deterministic	O
behavior	O
on	O
real-time	B-General_Concept
systems	I-General_Concept
avoiding	O
the	O
out	O
of	O
memory	O
errors	O
.	O
</s>
<s>
Memory	B-General_Concept
pools	I-General_Concept
may	O
need	O
to	O
be	O
tuned	O
for	O
the	O
application	O
which	O
deploys	O
them	O
.	O
</s>
