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

Update memory_set #3

Merged
merged 8 commits into from
Aug 26, 2024
Merged

Update memory_set #3

merged 8 commits into from
Aug 26, 2024

Conversation

aarkegz
Copy link
Collaborator

@aarkegz aarkegz commented Aug 20, 2024

  • use local memory_addr as dependecy ofmemory_set,
  • move generic params of mapping structures (F for Flags and P for PageTable) into MappingBackEnd as associated types, namely:
    • Addr: MemoryAddr, the address type,
    • Flags: Copy, the flags, and
    • PageTable, the page table type.

…eneric params of mapping structures into `MappingBackEnd` as associated types
@aarkegz aarkegz requested review from equation314 and hky1999 August 20, 2024 09:13
@aarkegz aarkegz self-assigned this Aug 20, 2024
@aarkegz
Copy link
Collaborator Author

aarkegz commented Aug 20, 2024

Making generic params associated types of MappingBackend is a little bit more complex than I expected, but I think it's acceptable.

@aarkegz aarkegz mentioned this pull request Aug 25, 2024
* demo: what if we add more bounds to `MemoryAddr`

* remove arithmetic bounds for `MemoryAddr`, add some provided methods

* rename `MemoryAddr::sub_addr` to `MemoryAddr::offset_from`

* remove a wrong bug todo

* add two more functions to `VirtAddr`

* add `add` and `sub` to `MemoryAddr`

* clarify the behavior of arithmetic operations of `MemoryAddr`, add detailed unit tests

* formatted

* add `overflowing_add/sub` to `MemoryAddr`

* add `checked_add/sub` to `MemoryAddr`

* `AddrRange` candidate B: allow malformed ranges and treat them as empty

* doc and tests improvement for `MemoryAddr` and `AddrRange`

* update `PageIter`

* formatted

* even more tests, ready to merge

* switch to `AddrRange` candidate A
@aarkegz
Copy link
Collaborator Author

aarkegz commented Aug 26, 2024

Ready to merge now.

hky1999
hky1999 previously approved these changes Aug 26, 2024
equation314
equation314 previously approved these changes Aug 26, 2024
@aarkegz aarkegz dismissed stale reviews from equation314 and hky1999 via ce66134 August 26, 2024 13:55
@hky1999
Copy link
Contributor

hky1999 commented Aug 26, 2024

Why don't you return error in memory_area's shink operations anymore?
memory area shrink check

I think returning an Error here is more appropriate.

Copy link
Contributor

@hky1999 hky1999 left a comment

Choose a reason for hiding this comment

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

LGGGGTM

@aarkegz aarkegz merged commit 46c06e5 into main Aug 26, 2024
10 checks passed
@aarkegz aarkegz deleted the update_memory_set branch August 26, 2024 16:27
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.

3 participants