Skip to content

Make Mmapper a struct, and existing impls storages #1345

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 2 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
2 changes: 1 addition & 1 deletion src/mmtk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ lazy_static! {
pub static ref VM_MAP: Box<dyn VMMap + Send + Sync> = layout::create_vm_map();

/// A global Mmapper for mmaping and protection of virtual memory.
pub static ref MMAPPER: Box<dyn Mmapper + Send + Sync> = layout::create_mmapper();
pub static ref MMAPPER: Box<Mmapper> = layout::create_mmapper();
}

use crate::util::rust_util::InitializeOnce;
Expand Down
2 changes: 1 addition & 1 deletion src/plan/global.rs
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ pub struct BasePlan<VM: VMBinding> {
/// is passed to each plan's constructor.
pub struct CreateGeneralPlanArgs<'a, VM: VMBinding> {
pub vm_map: &'static dyn VMMap,
pub mmapper: &'static dyn Mmapper,
pub mmapper: &'static Mmapper,
pub options: Arc<Options>,
pub state: Arc<GlobalState>,
pub gc_trigger: Arc<crate::util::heap::gc_trigger::GCTrigger<VM>>,
Expand Down
4 changes: 2 additions & 2 deletions src/policy/space.rs
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ pub struct CommonSpace<VM: VMBinding> {
pub extent: usize,

pub vm_map: &'static dyn VMMap,
pub mmapper: &'static dyn Mmapper,
pub mmapper: &'static Mmapper,

pub(crate) metadata: SideMetadataContext,

Expand Down Expand Up @@ -551,7 +551,7 @@ pub struct PlanCreateSpaceArgs<'a, VM: VMBinding> {
pub vmrequest: VMRequest,
pub global_side_metadata_specs: Vec<SideMetadataSpec>,
pub vm_map: &'static dyn VMMap,
pub mmapper: &'static dyn Mmapper,
pub mmapper: &'static Mmapper,
pub heap: &'a mut HeapMeta,
pub constraints: &'a PlanConstraints,
pub gc_trigger: Arc<GCTrigger<VM>>,
Expand Down
Loading
Loading