FEXCore/Allocator: Make pmr::default_resource a late initialized static object#5212
Open
Sonicadvance1 wants to merge 1 commit intoFEX-Emu:mainfrom
Open
FEXCore/Allocator: Make pmr::default_resource a late initialized static object#5212Sonicadvance1 wants to merge 1 commit intoFEX-Emu:mainfrom
Sonicadvance1 wants to merge 1 commit intoFEX-Emu:mainfrom
Conversation
neobrain
reviewed
Jan 12, 2026
neobrain
reviewed
Jan 14, 2026
| static fextl::pmr::default_resource FEXDefaultResource; | ||
| static std::once_flag default_resource_initialized {}; | ||
| static fextl::pmr::default_resource* FEXDefaultResource {}; | ||
| alignas(alignof(fextl::pmr::default_resource)) static char FEXDefaultResourcePlacement[sizeof(fextl::pmr::default_resource)]; |
Member
There was a problem hiding this comment.
FTR same point as in the other related PRs applies here, pending discussion over there.
48c2ee7 to
52a44d4
Compare
neobrain
requested changes
Feb 24, 2026
Member
neobrain
left a comment
There was a problem hiding this comment.
(highlighting pending discussions since our PR list is getting cluttered by stalled PRs)
…ic object Just a little bit of late initialization to this pmr object using placement new. Removes an `atexit` registration that contributes to crashing on exit.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Just a little bit of late initialization to this pmr object using placement new.
Removes an
atexitregistration that contributes to crashing on exit.