⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@mjp41
Copy link
Member

@mjp41 mjp41 commented Jan 27, 2026

This pulls in the entirety of snmalloc-rs and its history, and places it under snmalloc. This will allow for less breakages of the snmalloc-rs packages, and ensure we update them with all future releases.

See for discussion
#742

This PR is based on
#744
but keeps the history intact.

SchrodingerZhu and others added 30 commits January 20, 2020 22:58
- Use the master branch of microsoft/snmalloc
- Fix Documentation
- update README.md
- add ci
- fix windows and osx build
improving the performance in Windows
Bumps [snmalloc-sys/snmalloc](https://github.com/microsoft/snmalloc) from `7e22d30` to `1d72024`.
- [Release notes](https://github.com/microsoft/snmalloc/releases)
- [Commits](microsoft/snmalloc@7e22d30...1d72024)

Signed-off-by: dependabot-preview[bot] <[email protected]>
…ules/snmalloc-sys/snmalloc-1d72024

Bump snmalloc-sys/snmalloc from `7e22d30` to `1d72024`
`snmalloc` now supports alignment of all allocations with
  microsoft#124
This comment is no longer required.
Improve documents after upstream update
Bumps [snmalloc-sys/snmalloc](https://github.com/microsoft/snmalloc) from `4367a0c` to `3775a62`.
- [Release notes](https://github.com/microsoft/snmalloc/releases)
- [Commits](microsoft/snmalloc@4367a0c...3775a62)

Signed-off-by: dependabot-preview[bot] <[email protected]>
…ules/snmalloc-sys/snmalloc-3775a62

Bump snmalloc-sys/snmalloc from `4367a0c` to `3775a62`
Bumps [snmalloc-sys/snmalloc](https://github.com/microsoft/snmalloc) from `3775a62` to `ef77bcc`.
- [Release notes](https://github.com/microsoft/snmalloc/releases)
- [Commits](microsoft/snmalloc@3775a62...ef77bcc)

Signed-off-by: dependabot-preview[bot] <[email protected]>
SchrodingerZhu and others added 4 commits November 28, 2024 12:14
* Update build.rs

improve compatibilty and build errors on build_cc/cmake for windows

* Update build.rs improve clang64 MSYSTEM linking

pass tests

* Update lib.rs, thread/process share safety

null catches

* Update build.rs ninja not necessary

* Update build.rs ubuntu fix

* Update build.rs unify builds and reconfigure freebsd

In testing I noticed an almost doubling of test time between build_cc and cmake, they are now unified to make sure there is reduced chance of difference between builds. also enabled ability to read build environment of allocator

* Update build.rs correct ubuntu linking to stdc++ for thread local safety

* Update build.rs remove gcc link for tls

* Update build.rs freebsd link c++

* Update build.rs LTO/IPO working on all builds, unix/linux

* Update build.rs don't need static lib

* Update build.rs correct lib location differences on windows

* Update build.rs revert unix

* Update build.rs unix family includes linux
* Update snmalloc to 0.7.1

This tracks the upstream changes in snmalloc 0.7.1.

* Address warning from CI.
@mjp41 mjp41 requested a review from SchrodingerZhu January 27, 2026 11:22
@SchrodingerZhu
Copy link
Collaborator

Thanks for doing this. I will take a look of the porting process!

Copy link
Collaborator

@SchrodingerZhu SchrodingerZhu left a comment

Choose a reason for hiding this comment

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

LGTM

@mjp41 mjp41 force-pushed the snmalloc-rs-integration branch 3 times, most recently from 855b2f2 to 83a602a Compare January 28, 2026 10:57
@SchrodingerZhu
Copy link
Collaborator

On windows, zero-sized array potentially requires specialization.

@SchrodingerZhu
Copy link
Collaborator

use TerminateProcess(GetCurrentProcess(), STATUS_ABORTED); or RaiseFailFastException?

@mjp41
Copy link
Member Author

mjp41 commented Jan 28, 2026

@SchrodingerZhu, do you have any ideas why it keeps building Release static lib when it is a debug build. I don't know really know how to debug this part of the build system.

@SchrodingerZhu
Copy link
Collaborator

cmake-rs have some auto detection logic to inject cmake build profile

@mjp41 mjp41 force-pushed the snmalloc-rs-integration branch 3 times, most recently from ca71996 to 2a32bdf Compare January 28, 2026 16:29
@mjp41 mjp41 requested a review from SchrodingerZhu January 28, 2026 16:42
@mjp41 mjp41 force-pushed the snmalloc-rs-integration branch from 2a32bdf to 84a0548 Compare January 28, 2026 16:48
@mjp41
Copy link
Member Author

mjp41 commented Jan 28, 2026

@SchrodingerZhu I think this fixes the issues, the refactor of Array, I'll put in another PR as it is not essential to land that for the merge.

I just want to double check you are happy with this approach. I believe we will have all the original history, and even be able to apply patches from snmalloc-rs to here.

@SchrodingerZhu
Copy link
Collaborator

I am happy with the upstreaming. This also reduces the budern of updating the rust wrapper separately.

@mjp41 mjp41 merged commit aa4e364 into microsoft:main Jan 28, 2026
185 checks passed
@mjp41 mjp41 deleted the snmalloc-rs-integration branch January 28, 2026 18:59
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.

9 participants