Skip to content

Replace FragmentedMapper with TwoLevelMmapper #1337

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

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/util/heap/layout/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ pub mod vm_layout;
mod mmapper;
pub use self::mmapper::Mmapper;
mod byte_map_mmapper;
// Only make `two_level_mapper` available on 64-bit architectures because it contains 64-bit `usize`
// constants that only work on 64-bit architectures.
#[cfg(target_pointer_width = "64")]
mod fragmented_mapper;
mod two_level_mmapper;

mod map;
pub(crate) use self::map::CreateFreeListResult;
Expand Down Expand Up @@ -37,7 +39,7 @@ pub fn create_mmapper() -> Box<dyn Mmapper + Send + Sync> {
#[cfg(target_pointer_width = "64")]
pub fn create_mmapper() -> Box<dyn Mmapper + Send + Sync> {
// TODO: ByteMapMmapper for 39-bit or less virtual space
Box::new(fragmented_mapper::FragmentedMapper::new())
Box::new(two_level_mmapper::TwoLevelMmapper::new())
}

use crate::util::Address;
Expand Down
Loading