[php-src] Issue #20774: Single process memory model for opcache in ZTS
| From: | dktapps | Date: | Wed, 24 Dec 2025 05:05:49 +0000 |
| Subject: | [php-src] Issue #20774: Single process memory model for opcache in ZTS | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-251430@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/20774
Author: dktapps
### Description
In ZTS, all requests run inside the same process, so there's no need for coordination between
different processes.
This means that a non-SHM memory model could be used, and a lock file could be replaced by a regular
mutex.
This would be beneficial for applications that run exclusively in ZTS and create userland threads,
such as [PocketMine-MP](https://github.com/pmmp/PocketMine-MP). PocketMine already uses ZTS and
opcache CLI in most places, but it's currently unable to assume this is always available due to
some platforms restricting access to certain lockfile features and SHM, such as Android. PocketMine
has a lot of users who insist on running servers on their mobile devices for some reason, so
they'd stand to benefit :)
I don't know if there might be some advantages for ZTS in general (perhaps lower overhead?) but
this doesn't seem like a hard change in any case as far as I can understand, so I thought
I'd float the suggestion.