-
Notifications
You must be signed in to change notification settings - Fork 69
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
Introduce VMSpace, and allow VMSpace to be set lazily #802
Conversation
space is used as a VM space, and there is no allocation in the space.
space. We require VM space to be outside our heap range. Some minor cleanup.
binding-refs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only some minor suggestions.
src/policy/vmspace.rs
Outdated
fn name(&self) -> &str { | ||
self.space().name() | ||
} | ||
fn is_live(&self, object: ObjectReference) -> bool { | ||
self.space().is_live(object) | ||
} | ||
fn is_reachable(&self, object: ObjectReference) -> bool { | ||
self.space().is_reachable(object) | ||
} | ||
#[cfg(feature = "object_pinning")] | ||
fn pin_object(&self, object: ObjectReference) -> bool { | ||
self.space().pin_object(object) | ||
} | ||
#[cfg(feature = "object_pinning")] | ||
fn unpin_object(&self, object: ObjectReference) -> bool { | ||
self.space().unpin_object(object) | ||
} | ||
#[cfg(feature = "object_pinning")] | ||
fn is_object_pinned(&self, object: ObjectReference) -> bool { | ||
self.space().is_object_pinned(object) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this pattern (self.space().xxxx()
) repeats, we may introduce the delegate
crate: https://crates.io/crates/delegate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made the changes as suggested, using the delegate
crate. It works well.
@wks Is the PR good to merge? Let me know if other changes are needed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but I still added one minor comment.
Update to mmtk/mmtk-core#802: Setting VM space start and size by options
Merge with mmtk/mmtk-core#802 and mmtk/julia#12
This PR allows users to set the start address and size for VM space, and also allows VM space to be initialised lazily.
VMSpace
which wraps the normalImmortalSpace
. The policy is mostly the same asImmortalSpace
except that the space may be uninitialized and can be initialized later.vm_space_start
andvm_space_size
.align_allocation
.