Skip to content

[FEATURE] tighten up memory allocations #4865

@lyakh

Description

@lyakh

The SOF heap allocations are multi-purpose with distinct features:

  1. they can be cached or uncached
  2. there is a special allocation type for memory, that will never be freed back. Those allocations also panic if they fail
  3. there is an allocation type for larger memory block, e.g. for audio buffers
  4. some of those allocation types also initialise memory with 0s

Work is currently underway to simplify and make those allocations more robust. I'd like to consider several more changes:

  1. convert some of init-time no-free allocations to static objects in .data or .bss
  2. re-consider whether all 0-initialised allocations really need that. In particular large-size / buffer type allocations do that unconditionally, and it appears likely to me, that e.g. audio buffers will be completely overwritten with audio data so such initialisations have no value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions