1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Improve shared_alloc_shm.c strategy to support OPcache JIT on Solaris

The SysV shared memory allocator in OPcache hardcodes a maximum segment size of
32MB (SEG_ALLOC_SIZE_MAX). If the JIT buffer exceeds this, which it does with
the default 64MB size, startup will fail with "Insufficient shared memory!".

The allocator will now try allocating a contiguous buffer first, and only then
use segmentation by searching for continuously smaller powers of 2.

Fixes GH-20718
Closes GH-20719
This commit is contained in:
Petr Sumbera
2025-12-16 14:39:43 +01:00
committed by Ilija Tovilo
parent 2cabea66b3
commit 7c6f08945f
2 changed files with 26 additions and 21 deletions

4
NEWS
View File

@@ -26,6 +26,10 @@ PHP NEWS
. Fixed bug GH-21097 (Accessing Dom\Node properties can can throw TypeError).
(ndossche)
- Opcache:
. Fixed bug GH-20718 ("Insufficient shared memory" when using JIT on Solaris).
(Petr Sumbera)
- PDO_PGSQL:
. Fixed bug GH-21055 (connection attribute status typo for GSS negotiation).
(lsaos)