Skip to content
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

build: Remove heap allocator #334

Merged
merged 1 commit into from
May 15, 2024
Merged

Conversation

retrage
Copy link
Contributor

@retrage retrage commented May 14, 2024

PR #92 introduced heap allocator to implement EFI variable feature. However, none of other components uses heap. This commit removes the heap allocator and use the heapless crate instead of Vec. This change simplifies the build arguments.

PR cloud-hypervisor#92 introduced heap allocator to implement EFI variable feature.
However, none of other components uses heap. This commit removes the
heap allocator and use the `heapless` crate instead of `Vec`. This
change simplifies the build arguments.

Signed-off-by: Akira Moroo <retrage01@gmail.com>
@retrage retrage requested a review from rbradford May 14, 2024 08:53
@rbradford
Copy link
Member

@retrage I'm happy to remove this - but do you think the support for protocol installation might require dynamic memory allocation?

@retrage
Copy link
Contributor Author

retrage commented May 15, 2024

@retrage I'm happy to remove this - but do you think the support for protocol installation might require dynamic memory allocation?

@rbradford My prototype of the protocol manager uses the fixed-sized hash map heapless::FnvIndexMap to hold installed protocol data (The code is here: 759f4f6, but it's still work in progress). It should work without dynamic memory allocation (at least Rust's GlobalAlloc)

@retrage retrage added this pull request to the merge queue May 15, 2024
Merged via the queue into cloud-hypervisor:main with commit a46a644 May 15, 2024
7 checks passed
@retrage retrage deleted the use-heapless branch May 15, 2024 13:00
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