4.6.1 Fixed-size Memory Pool

A .xed-size memory pool is an object used for dynamic management of .xed-size memory blocks. Functions are provided for creating and deleting a .xed-size memory pool, getting and returning memory blocks in a .xed-size memory pool, and referencing the status of a .xed-size memory pool. A .xed-size memory pool is an object identi.ed by an ID number called a .xed-size memory pool ID.

A .xed-size memory pool has a memory space used as the .xed-size memory pool (called a .xed-size memory pool area or simply memory pool area), and a queue for tasks waiting for memory block allocation. A task wanting to allocate a memory block from a .xed-size memory pool that lacks su.cient available memory space goes to WAIT state for .xed-size memory block until memory blocks are returned to the pool. A task in this state is put in the task queue of the .xed-size memory pool.

[Additional Notes]

When memory blocks of various sizes are needed from .xed-size memory pools, it is necessary to provide multiple memory pools of di.erent sizes.

Comments