feat(block): optimize ramdisk, add static variant#8
Open
eternalcomet wants to merge 9 commits intoarceos-org:mainfrom
Open
feat(block): optimize ramdisk, add static variant#8eternalcomet wants to merge 9 commits intoarceos-org:mainfrom
eternalcomet wants to merge 9 commits intoarceos-org:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR optimizes the RAM disk implementation and adds a new static RAM disk variant. The heap-backed RAM disk is refactored from using Vec<u8> to a raw heap allocation with NonNull<[u8]>, and a new static RAM disk driver that operates on statically allocated memory buffers is introduced.
Key Changes
- Refactored heap-backed RAM disk to use
NonNull<[u8]>instead ofVec<u8>for more direct memory management - Added new
ramdisk_static.rsmodule providing a RAM disk backed by a'static mut [u8]buffer - Added
ramdisk-staticfeature flag toCargo.toml
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 10 comments.
| File | Description |
|---|---|
axdriver_block/src/ramdisk.rs |
Refactored to use raw heap allocation with manual memory management instead of Vec |
axdriver_block/src/ramdisk_static.rs |
New static RAM disk implementation for statically allocated buffers |
axdriver_block/src/lib.rs |
Added ramdisk_static module export with feature gate |
axdriver_block/Cargo.toml |
Added ramdisk-static feature flag and reorganized features alphabetically |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Azure-stars
reviewed
Dec 31, 2025
Azure-stars
reviewed
Dec 31, 2025
AsakuraMizu
approved these changes
Dec 31, 2025
Contributor
|
Update on 1.13: considering using Tagged pointer to save a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NonNull<[u8]>) instead of aVec<u8>, beacause we doesn't use any method inVec.