Skip to content

feat: allocator extension for splice - #733

Merged
alejandro-vaz merged 6 commits into
servo:v2from
alejandro-vaz:extend-splice
Oct 6, 2026
Merged

alejandro-vaz merged 6 commits into
servo:v2from
alejandro-vaz:extend-splice

Conversation

@alejandro-vaz

Copy link
Copy Markdown
Collaborator

this PR extends Splice to not require a global allocator when using it

it does so by taking a reference to the allocator in the drain of the smallvec, since all allocator methods can be called on an immutable reference

closes #700

@alejandro-vaz
alejandro-vaz requested a review from jdm October 5, 2026 12:27
@alejandro-vaz alejandro-vaz self-assigned this Oct 5, 2026
Comment thread src/iterators/splice/allocref.rs Outdated
};

#[repr(transparent)]
pub struct Allocref<'valid, Heap: Allocator>(pub &'valid Heap);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
pub struct Allocref<'valid, Heap: Allocator>(pub &'valid Heap);
pub struct AllocRef<'valid, Heap: Allocator>(pub &'valid Heap);

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

tbh I'm not even happy with Allocref/AllocRef, I'll figure out a different name

@alejandro-vaz alejandro-vaz mentioned this pull request Oct 6, 2026
@alejandro-vaz

Copy link
Copy Markdown
Collaborator Author

in the end it was called Proxy and #739 moves it to the allocator machinery

@alejandro-vaz
alejandro-vaz added this pull request to the merge queue Oct 6, 2026
Merged via the queue into servo:v2 with commit 03105d1 Oct 6, 2026
8 checks passed
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.

allocator expansion for Splice?

2 participants