Skip to content

Remove unsafety for uninitialized allocatr. Initialize with unusable space instead.#1486

Draft
qinsoon wants to merge 1 commit into
mmtk:masterfrom
qinsoon:unusable-space
Draft

Remove unsafety for uninitialized allocatr. Initialize with unusable space instead.#1486
qinsoon wants to merge 1 commit into
mmtk:masterfrom
qinsoon:unusable-space

Conversation

@qinsoon

@qinsoon qinsoon commented Apr 22, 2026

Copy link
Copy Markdown
Member

Inspired by #1483.

  • Initialize all the allocators with unusable space first.
  • Then initialize the allocators that a plan may use with proper spaces.
  • Refactor allocators so all allocators reference a &dyn Space. This requires changing bindings, as the layout of allocators are changed.

@qinsoon

qinsoon commented Apr 22, 2026

Copy link
Copy Markdown
Member Author

I will make binding side changes if we think this is a good idea.

@k-sareen

Copy link
Copy Markdown
Collaborator

I think this solution is preferred over #1483 since we need to ensure that MutatorContext is FFI-safe in case bindings want to embed it entirely.

@wks

wks commented Apr 22, 2026

Copy link
Copy Markdown
Collaborator

I think this solution is preferred over #1483 since we need to ensure that MutatorContext is FFI-safe in case bindings want to embed it entirely.

Alternatively, we can first investigate whether disallowing embedding Mutator in favor for embedding only BumpPointer can keep the performance good in OpenJDK. If that's possible, we can refactor the Mutator even more aggressively.

See:

@qinsoon

qinsoon commented Apr 22, 2026

Copy link
Copy Markdown
Member Author

#1483 seems good to me. If it is merged, we can close this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants