Skip to content

vmh: limit additional buffers to non-Linux configurations#10709

Open
lyakh wants to merge 1 commit intothesofproject:mainfrom
lyakh:vmh
Open

vmh: limit additional buffers to non-Linux configurations#10709
lyakh wants to merge 1 commit intothesofproject:mainfrom
lyakh:vmh

Conversation

@lyakh
Copy link
Copy Markdown
Collaborator

@lyakh lyakh commented Apr 19, 2026

Commit 7f66827 ("zephyr: alloc: add 32K virtual heap bucket") unconditionally added 256k to Virtual Heap buckets. Make this conditional on a Kconfig option.

Commit 7f66827 ("zephyr: alloc: add 32K virtual heap bucket")
unconditionally added 256k to Virtual Heap buckets. Make this
conditional on a Kconfig option.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR makes the extra 32KB virtual heap bucket (and corresponding virtual heap region size) configurable so Linux builds can reclaim that memory for virtual page/region bookkeeping.

Changes:

  • Add a VIRTUAL_HEAP_EXTENDED Kconfig option (default y) to control whether the additional VMH buffers are included.
  • Conditionally include the 32KB VMH bucket in zephyr/lib/alloc.c when VIRTUAL_HEAP_EXTENDED=y.
  • Disable VIRTUAL_HEAP_EXTENDED in the Linux overlay, which also reduces the default SOF_ZEPHYR_VIRTUAL_HEAP_REGION_SIZE accordingly.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
zephyr/lib/alloc.c Wraps the 32KB VMH bucket behind CONFIG_VIRTUAL_HEAP_EXTENDED.
zephyr/Kconfig Introduces VIRTUAL_HEAP_EXTENDED and makes virtual heap region size default conditional.
app/os_linux_overlay.conf Disables VIRTUAL_HEAP_EXTENDED for Linux builds to free VM space for virtual regions/pages.

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.

2 participants