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

VSpace: Unify the uses of ScratchRegion, ReservedRegion, and MappedRegion #18

Open
pittma opened this issue Jun 24, 2019 · 1 comment
Open

Comments

@pittma
Copy link
Contributor

pittma commented Jun 24, 2019

These three types grew at distinct times in the development of VSpace 2: The Address Space Odyssey and they could be contracted into a single type which serves the needs of each use case.

This is a follow up to #9.

@pittma
Copy link
Contributor Author

pittma commented Aug 6, 2019

If MemoryRegion learns how to unmap itself, we can replace the current uses of ScratchRegion with an exclusive MemoryRegion which gets unmapped after it's been used locally. ELF setup, however, has a special case—it needs pages. Therefore we create a ScratchRegion-like type which aliases the VSpace capability and has ownership of a single page's worth of address space. It uses the ReservedRegion mechanics to set up the intermediate paging structures, then takes MemoryRegions of size PageBits into a temporarily_map function a lá ScratchRegion::temporarily_map_region.

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

No branches or pull requests

1 participant