Skip to content

llext: add dynamic heap allocation support #90871

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

alexivanov-google
Copy link
Contributor

Some applications require loading extensions into the memory which does not exist during the boot time and cannot be allocated statically. Make the application responsible for LLEXT heap allocation. Do not allocate LLEXT heap statically.

This is created from and is a continuation of PR #90763.

TODO(@alexivanov-google): Comments to be addressed #90763 (comment)

@teburd
Copy link
Collaborator

teburd commented May 30, 2025

The change looks good, please add a test case so that it doesn't bitrot, should be fairly straightfoward

teburd
teburd previously approved these changes May 30, 2025
@alexivanov-google
Copy link
Contributor Author

@pillo79, I added init/uninit calls, please take a look.

@alexivanov-google alexivanov-google requested a review from teburd May 31, 2025 02:42
@alexivanov-google alexivanov-google force-pushed the llext-heap-dynamic branch 4 times, most recently from e49e450 to 62a9127 Compare June 1, 2025 14:01
Copy link
Collaborator

@pillo79 pillo79 left a comment

Choose a reason for hiding this comment

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

Thanks! LGTM, just a sanity check and some wording suggestions. Also, would you mind adding a note for CONFIG_LLEXT_HEAP_DYNAMIC to this doc paragraph as well?

Heap size
----------
The LLEXT subsystem needs a static heap to be allocated for extension related
data. The following option controls this allocation.

Copy link
Collaborator

@pillo79 pillo79 left a comment

Choose a reason for hiding this comment

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

Thanks again. Please use appropriate RST syntax, nothing else really.

Some applications require loading extensions into the memory which does
not exist during the boot time and cannot be allocated statically. Make
the application responsible for LLEXT heap allocation. Do not allocate
LLEXT heap statically.

Signed-off-by: Alex Ivanov <[email protected]>
Copy link

sonarqubecloud bot commented Jun 4, 2025

@nashif nashif merged commit 5a9394a into zephyrproject-rtos:main Jun 4, 2025
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: llext Linkable Loadable Extensions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants