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

Fully static PALs and simplified inheritance #245

Merged
merged 8 commits into from
Sep 9, 2020
Merged

Conversation

nwf
Copy link
Collaborator

@nwf nwf commented Sep 7, 2020

See #233 .

src/ds/aba.h Outdated Show resolved Hide resolved
src/ds/aba.h Outdated Show resolved Hide resolved
src/ds/concept.h Show resolved Hide resolved
src/pal/pal_concept.h Show resolved Hide resolved
src/mem/alloc.h Outdated Show resolved Hide resolved
src/mem/slab.h Outdated Show resolved Hide resolved
src/mem/mediumslab.h Outdated Show resolved Hide resolved
For reasons unknown, this appeases MSVC using C++20.
"Pal" is a global symbol for the current architecture's platform abstraction
layer class (see src/pal/pal.h); to be less confusing, don't shadow it with a
template parameter on the AddressSpaceManager class, and instead use "PAL" as
is done elsewhere for template arguments.
This will not be used unless the C++ standard version is raised to 20.  As
concepts and C++20 more generally are quite new, this does not do so.
Nevertheless, the use of concepts can improve the local development experience
as type mismatches are discovered earlier (at template invocation rather than
only during expansion).
If we're going to explore fully-static PALs, then we shouldn't need a
constructor.
Copy link
Member

@mjp41 mjp41 left a comment

Choose a reason for hiding this comment

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

Could you update the documentation about writing a Pal:
https://github.com/microsoft/snmalloc#porting-snmalloc-to-a-new-platform

This needs littering with static now.

Copy link
Member

@mjp41 mjp41 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 merged commit 17d5a3e into microsoft:master Sep 9, 2020
@nwf nwf deleted the static-pal branch December 14, 2020 19:05
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.

4 participants