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

Implement paging #31

Merged
merged 5 commits into from Oct 29, 2023
Merged

Implement paging #31

merged 5 commits into from Oct 29, 2023

Conversation

0xf4lc0n
Copy link
Member

Resolves #17

The MemoryManager is useful when it comes to testing or abstracting operations that require both OffsetPageTable and BootInfoFrameAllocator.

But registering it as singleton hidden behind Once<Mutex<..>> may be not very convenient.

In future we will need MemoryManager inside alloc module or any other module that handles heap allocation.

Saying so there will be no reason to use MemoryManager outside of alloc module. So we can pass MemoryManager directly to that module and provide Once<Mutex<MemoryManager>> only for test purposes (by using #[cfg] attribute).

Feel free to provide your feedback.

kernel/src/memory.rs Outdated Show resolved Hide resolved
kernel/src/memory.rs Outdated Show resolved Hide resolved
kernel/src/memory.rs Show resolved Hide resolved
Copy link

@Vie0n Vie0n left a comment

Choose a reason for hiding this comment

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

LGTM

@0xf4lc0n 0xf4lc0n merged commit f04dadf into grupacosmo:main Oct 29, 2023
3 checks passed
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.

Implement paging
2 participants