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

Fix length of Map64::descriptor_map #956

Merged
merged 1 commit into from
Sep 19, 2023

Conversation

wks
Copy link
Collaborator

@wks wks commented Sep 18, 2023

Its length should be MAX_SPACES instead of MAX_CHUNKS.

The size was MAX_SPACES in the JikesRVM MMTk. It may have been a typo when porting JikesRVM MMTk to Rust.

The new Map64::descriptor_map does not deserve the unsafe new_zeroed_vec function which was introduced to solve the slow start-up problem. We keep new_zeroed_vec just in case we may still need it in the future.

Its length should be MAX_SPACES instead of MAX_CHUNKS.
@wks
Copy link
Collaborator Author

wks commented Sep 18, 2023

@wenyuzhao We used vm_layout()::max_chunks() to find the number of chunks, but I didn't find a method in VMLayout that returns the number of spaces. I assume we should still use MAX_SPACES, shouldn't we? Did I miss anything?

Copy link
Member

@qinsoon qinsoon left a comment

Choose a reason for hiding this comment

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

LGTM

@wenyuzhao
Copy link
Member

@wenyuzhao We used vm_layout()::max_chunks() to find the number of chunks, but I didn't find a method in VMLayout that returns the number of spaces. I assume we should still use MAX_SPACES, shouldn't we? Did I miss anything?

Yes I think MAX_SPACES is the correct one to use. Unlike max_chunks which is related to the vm layout defined at runtime, max spaces is a hardcoded constant.

@wks wks added this pull request to the merge queue Sep 19, 2023
@qinsoon qinsoon added the PR-testing Run binding tests for the pull request (deprecated: use PR-extended-testing instead) label Sep 19, 2023
Merged via the queue into mmtk:master with commit 15e19a1 Sep 19, 2023
25 of 26 checks passed
@wks wks deleted the fix/decriptor_map-64-wrong-size branch September 19, 2023 03:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-testing Run binding tests for the pull request (deprecated: use PR-extended-testing instead)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants