diff options
author | Sandrine Bailleux <sandrine.bailleux@arm.com> | 2018-06-01 14:17:08 +0200 |
---|---|---|
committer | Sandrine Bailleux <sandrine.bailleux@arm.com> | 2018-10-11 16:11:18 +0200 |
commit | 9cc4651c9d7098e8ef659e067e501f436f488988 (patch) | |
tree | 634d232ddaf2442d9a6073a8898b77226dd0b9de /drivers/renesas | |
parent | f7a18268ad2201176ffc882b43c900f9d025bde1 (diff) | |
download | trusted-firmware-a-9cc4651c9d7098e8ef659e067e501f436f488988.tar.gz |
Introduce object pool allocator
The object pool allocator provides a simplistic interface to manage
allocation in a fixed-size static array. The caller creates a static
"object pool" out of such an array and may then call pool_alloc() to
get the next available object within the pool. There is also a variant
to get multiple consecutive objects: pool_alloc_n().
Note that this interface does not provide any way to free the objects
afterwards. This is by design and it is not a limitation. We do not
want to introduce complexity induced by memory freeing, such as
use-after-free bugs, memory fragmentation and so on.
Change-Id: Iefc2e153767851fbde5841a295f92ae48adda71f
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Diffstat (limited to 'drivers/renesas')
0 files changed, 0 insertions, 0 deletions