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

[proxy](1/n) start self-vendored STL with atomic #715

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SchrodingerZhu
Copy link
Collaborator

@SchrodingerZhu SchrodingerZhu commented Dec 18, 2024

This patch starts to vendor functionalities from STL using our own code.
It adds a SNMALLOC_USE_SELF_VENDORED_STL option which means snmalloc will try to build its core header library without c++ STL.

The way we do this is to introduce a proxy which dispatches underlying implementations based on SNMALLOC_USE_SELF_VENDORED_STL. It is allowed to use STL in tests even when SNMALLOC_USE_SELF_VENDORED_STL=On.

This patch only includes changes related to std::atomic. The snmalloc::Atomic is simple wrapper of compiler intrinsics that only support trivial types with unique object representations.

@SchrodingerZhu SchrodingerZhu marked this pull request as draft December 18, 2024 15:57
@SchrodingerZhu SchrodingerZhu changed the title [proxy] start self-vendored STL [proxy] start self-vendored STL with atomic Dec 18, 2024
@SchrodingerZhu SchrodingerZhu marked this pull request as ready for review December 18, 2024 20:03
@SchrodingerZhu
Copy link
Collaborator Author

SchrodingerZhu commented Dec 18, 2024

The NetBSD's unsecure mirror is not working. not sure how to fix it.

It resolves on its own.

@SchrodingerZhu SchrodingerZhu requested a review from mjp41 December 19, 2024 16:39
@SchrodingerZhu SchrodingerZhu changed the title [proxy] start self-vendored STL with atomic [proxy](1/n) start self-vendored STL with atomic Dec 19, 2024
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