Skip to content

snmalloc-rs: add opt-in Allocator API support - #908

Merged
Matthew Parkinson (mjp41) merged 3 commits into
microsoft:mainfrom
Theodus:rust-crate
Nov 29, 2026
Merged

Matthew Parkinson (mjp41) merged 3 commits into
microsoft:mainfrom
Theodus:rust-crate

Conversation

@Theodus

Copy link
Copy Markdown
Contributor

The core::alloc::Allocator has landed in stable Rust, as of version 1.100.0 (release notes). This change adds support for this new API behind a feature flag.

This also includes 2 minor bugfixes:

  • Correct deallocation layouts in realloc tests. This error was masked by using allocation sizes within the same size class.
  • Correct the return type of sn_rust_dealloc to (), instead of c_void. c_void is only equivalent to C's void type when used as a pointer (docs).

@mjp41 Matthew Parkinson (mjp41) left a comment

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.

LGTM

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@mjp41
Matthew Parkinson (mjp41) merged commit 7cf6017 into microsoft:main Nov 29, 2026
216 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.

3 participants