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

POC: add snmalloc as an alternative allocator to libc #122284

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

SchrodingerZhu
Copy link
Contributor

@SchrodingerZhu SchrodingerZhu commented Jan 9, 2025

Does not work yet. I need to work out a lot more details. This is for collecting ideas.

snmalloc is already supported in LLVM for windows CRT replacement, we can also use it as an implementation of our allocator:

if(LLVM_INTEGRATED_CRT_ALLOC)

Adding snmalloc will push forward our support on windows/macos easily. It also provides linux target with a modern allocator alternative.

I have made snmalloc buildable with clean C headers in microsoft/snmalloc#722, hence, it can now be used in a way largely similar to scudo standalone allocator.

malloc.cpp.o is already buildable with some ad-hoc fixes, so I think there is no technical obstacle.

@SchrodingerZhu
Copy link
Contributor Author

cc @mjp41

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.

1 participant