Skip to content

Conversation

@jsarha
Copy link
Contributor

@jsarha jsarha commented Aug 27, 2025

No description provided.

Do not allocate module memory containers one by one, but allocate them
in chunks.

The bookkeeping of allocated resources is done using containers that
are allocated from heap. This effectively doubles the amount of heap
allocations. This is not very efficient especially since the containers
are only 20 bytes in size.

This commit changes the allocation of containers so that they are
always allocated in chunks of 16 containers, or what is selected with
MODULE_MEMORY_API_CONTAINER_CHUNK_SIZE Kconfig option. The unused
containers are not freed when the associated resource is
freed. Instead the unused containers are kept in free containers
list. All the containers are freed when mod_free_all() is called, for
instance when the module unloads.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
@jsarha jsarha changed the title Test PR to find out which commit causes the CI problems [CI TEST not for review]Test PR to find out which commit causes the CI problems Sep 1, 2025
@jsarha jsarha closed this Sep 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant