[php-src] PR #24782: Fix GH-24777: Free cached chunks before failing on memory_limit

From: Date: Tue, 27 Oct 2026 11:16:45 +0000
Subject: [php-src] PR #24782: Fix GH-24777: Free cached chunks before failing on memory_limit
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-39964@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/24782 Author: lazerg Chunks cached by zend_mm_shutdown() for the next request still count towards real_size. Small allocations reuse them, but a huge allocation is mapped separately, so after a few heavy requests a light request can hit memory_limit on its first huge allocation even though most of the counted memory is free. zend_mm_check_limit() now releases cached chunks when the limit would be exceeded after zend_mm_gc(), the same way zend_set_memory_limit() already does. Fixes #24777

« previous php.git-pulls (#39964) next »