Skip to content

Use only get_virtual_memory_page_size()#194

Open
jodyhagins wants to merge 2 commits into
foonathan:mainfrom
jodyhagins:virtual_memory_page_size
Open

Use only get_virtual_memory_page_size()#194
jodyhagins wants to merge 2 commits into
foonathan:mainfrom
jodyhagins:virtual_memory_page_size

Conversation

@jodyhagins

Copy link
Copy Markdown

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.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant