Memory pool management functions – Comtrol eCos User Manual
Page 481
Chapter 32. µITRON API
Memory pool Management Functions
These functions are fully supported in this release:
ER
get_blf
(
VP *p_blf,
ID mpfid )
ER
pget_blf
(
VP *p_blf,
ID mpfid )
ER
tget_blf
(
VP *p_blf,
ID mpfid,
TMO tmout )
ER
rel_blf
(
ID mpfid,
VP blf )
ER
ref_mpf
(
T_RMPF *pk_rmpf,
ID mpfid )
ER
get_blk
(
VP *p_blk,
ID mplid,
INT blksz )
ER
pget_blk
(
VP *p_blk,
ID mplid,
INT blksz )
ER
tget_blk
(
VP *p_blk,
ID mplid,
INT blksz,
TMO tmout )
ER
rel_blk
(
ID mplid,
VP blk )
ER
ref_mpl
(
T_RMPL *pk_rmpl,
ID mplid )
Note that of the memory provided for a particular pool to manage in the static initialization of the memory pool
objects, some memory will be used to manage the pool itself. Therefore the number of blocks * the blocksize will
be less than the total memory size.
The
following
functions
are
supported
in
this
release,
when
enabled
with
CYG-
PKG_UITRON_MEMPOOLVAR_CREATE_DELETE
or
CYGPKG_UITRON_MEMPOOLFIXED_CREATE_DELETE
as
appropriate, with some restrictions:
ER
cre_mpl
(
ID mplid,
T_CMPL *pk_cmpl )
ER
del_mpl
(
ID mplid )
ER
cre_mpf
(
ID mpfid,
T_CMPF *pk_cmpf )
ER
del_mpf
(
ID mpfid )
Because of the static initialization facilities provided for system objects, a memory pool is allocated a region of
memory to manage statically in the configuration. So while memory pools can be created and deleted, the same area
377