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

Compute the size of pages before allocating memory #14650

Merged
merged 1 commit into from
Jun 24, 2024

Conversation

jvoisin
Copy link
Contributor

@jvoisin jvoisin commented Jun 24, 2024

start_memory_manager() calls zend_mm_init() via alloc_globals_ctor() before setting REAL_PAGE_SIZE to the right value. Moving the REAL_PAGE_SIZE setting block before the call to alloc_globals_ctor() makes the allocator behave properly on systems with a page size different than 4k.

Suggested-by: arnaud-lb

`start_memory_manager()` calls `zend_mm_init()` via `alloc_globals_ctor()`
before setting `REAL_PAGE_SIZE` to the right value. Moving the `REAL_PAGE_SIZE`
setting block before the call to `alloc_globals_ctor()` makes the allocator
behave properly on systems with a page size different than 4k.

Suggested-by: arnaud-lb
@jvoisin jvoisin requested a review from dstogov as a code owner June 24, 2024 13:59
@arnaud-lb arnaud-lb merged commit e3c9f5a into php:master Jun 24, 2024
9 of 11 checks passed
@arnaud-lb
Copy link
Member

Thank you!

arnaud-lb added a commit that referenced this pull request Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants