Introduce VMSpace, and allow VMSpace to be set lazily#802
Merged
qinsoon merged 25 commits intommtk:masterfrom May 8, 2023
Merged
Introduce VMSpace, and allow VMSpace to be set lazily#802qinsoon merged 25 commits intommtk:masterfrom
qinsoon merged 25 commits intommtk:masterfrom
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.
Member
Author
|
binding-refs |
wks
reviewed
May 4, 2023
wks
reviewed
May 5, 2023
Collaborator
wks
left a comment
There was a problem hiding this comment.
Only some minor suggestions.
src/policy/vmspace.rs
Outdated
Comment on lines
+23
to
+43
| 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) | ||
| } |
Collaborator
There was a problem hiding this comment.
If this pattern (self.space().xxxx()) repeats, we may introduce the delegate crate: https://crates.io/crates/delegate
Member
Author
There was a problem hiding this comment.
I made the changes as suggested, using the delegate crate. It works well.
Member
Author
|
@wks Is the PR good to merge? Let me know if other changes are needed. |
wks
approved these changes
May 8, 2023
Collaborator
wks
left a comment
There was a problem hiding this comment.
LGTM, but I still added one minor comment.
qinsoon
added a commit
to mmtk/mmtk-jikesrvm
that referenced
this pull request
May 8, 2023
Update to mmtk/mmtk-core#802: Setting VM space start and size by options
qinsoon
added a commit
to mmtk/mmtk-julia
that referenced
this pull request
May 8, 2023
Merge with mmtk/mmtk-core#802 and mmtk/julia#12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR allows users to set the start address and size for VM space, and also allows VM space to be initialised lazily.
VMSpacewhich wraps the normalImmortalSpace. The policy is mostly the same asImmortalSpaceexcept that the space may be uninitialized and can be initialized later.vm_space_startandvm_space_size.align_allocation.