Use only get_virtual_memory_page_size()#194
Open
jodyhagins wants to merge 2 commits intofoonathan:mainfrom
Open
Use only get_virtual_memory_page_size()#194jodyhagins wants to merge 2 commits intofoonathan:mainfrom
jodyhagins wants to merge 2 commits intofoonathan:mainfrom
Conversation
added 2 commits
August 27, 2025 08:52
virtual_memory_page_size has been deprecated, but it was being used internally extensively. Prior to this change, static use was impossible if PAGESIZE or PAGE_SIZE weren't set. The deprecation has been taken one step forward in that virtual_memory_page_size is no longer available by default. This is a breaking change, but the previous behavior can be enabled with FOONATHAN_MEMORY_ALLOW_VIRTUAL_MEMORY_PAGE_SIZE.
The initialization order is undetermined, and is difficult to reproduce in a test, but this one has a better chance of hitting the failure situation where the virtual_memory_page_size variable is accessed before it has been set, yielding a value of zero. This is basically the crash scenario that I encountered, which prompted these changes.
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.
virtual_memory_page_size has been deprecated, but it was being used internally extensively. Prior to this change, static use was impossible if PAGESIZE or PAGE_SIZE weren't set.
The deprecation has been taken one step forward in that virtual_memory_page_size is no longer available by default. This is a breaking change, but the previous behavior can be enabled with FOONATHAN_MEMORY_ALLOW_VIRTUAL_MEMORY_PAGE_SIZE.