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

Use compressed pointer to save internal memory usage in MMTk #1246

Open
qinsoon opened this issue Dec 4, 2024 · 1 comment
Open

Use compressed pointer to save internal memory usage in MMTk #1246

qinsoon opened this issue Dec 4, 2024 · 1 comment
Labels
A-general Area: all code base (issues with this label may be divided into more concrete issues) C-enhancement Category: Enhancement F-request-for-MEP Call for participation: Upgraded this issue to an MEP (see mmtk-core/docs/contribute/mep.md)

Comments

@qinsoon
Copy link
Member

qinsoon commented Dec 4, 2024

MMTk currently uses ObjectReference to represent an object. ObjectReference is word sized, and have to be word aligned. If a VM uses compressed pointers, they will have to decompress the pointers and supply those to MMTk as ObjectReference. This means inside MMTk, we always store pointers in its plain form, which can lead to significant memory overhead, compared to using compressed pointers (which is half of the size of plain pointers).

@wks wrote here that we may want to introduce another compressed form of ObjectReference, which can be used where we care about the memory over head. For example, the object queues. We also need the current ObjectReference as it is faster to use (no decompression).

This would be a major change to the code base and our API. I think an MEP is needed.

@qinsoon qinsoon added C-enhancement Category: Enhancement A-general Area: all code base (issues with this label may be divided into more concrete issues) F-request-for-MEP Call for participation: Upgraded this issue to an MEP (see mmtk-core/docs/contribute/mep.md) labels Dec 4, 2024
@qinsoon
Copy link
Member Author

qinsoon commented Dec 4, 2024

We should measure the memory overhead first before doing anything about this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-general Area: all code base (issues with this label may be divided into more concrete issues) C-enhancement Category: Enhancement F-request-for-MEP Call for participation: Upgraded this issue to an MEP (see mmtk-core/docs/contribute/mep.md)
Projects
None yet
Development

No branches or pull requests

1 participant