Skip to content

Compute the size of pages before allocating memory - #14650

Merged
arnaud-lb merged 1 commit into
php:masterfrom
jvoisin:fix_pages
Jun 24, 2024
Merged

arnaud-lb merged 1 commit into
php:masterfrom
jvoisin:fix_pages

Conversation

@jvoisin

@jvoisin jvoisin commented Jun 24, 2024

Copy link
Copy Markdown
Contributor

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
@arnaud-lb

Copy link
Copy Markdown
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.

2 participants