Commit 44f564c3210 for php.net
commit 44f564c32105e2f9601a2e9c219d19238945c9ec
Author: Weilin Du <weilindu@php.net>
Date: Tue Aug 11 17:06:28 2026 +0800
ext/opcache: Name map ptr chunk size constants (#23212)
This is a missing case of #23109
diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c
index 8685fb56415..cf62765d9e1 100644
--- a/ext/opcache/ZendAccelerator.c
+++ b/ext/opcache/ZendAccelerator.c
@@ -4742,11 +4742,11 @@ static void preload_load(size_t orig_map_ptr_static_last)
size_t old_map_ptr_last = CG(map_ptr_last);
if (zend_map_ptr_static_last != ZCSG(map_ptr_static_last) || old_map_ptr_last != ZCSG(map_ptr_last)) {
CG(map_ptr_last) = ZCSG(map_ptr_last);
- CG(map_ptr_size) = ZEND_MM_ALIGNED_SIZE_EX(ZCSG(map_ptr_last) + 1, 4096);
+ CG(map_ptr_size) = ZEND_MM_ALIGNED_SIZE_EX(ZCSG(map_ptr_last) + 1, ZEND_MAP_PTR_CHUNK_SIZE);
zend_map_ptr_static_last = ZCSG(map_ptr_static_last);
/* Grow map_ptr table as needed, but allocate once for static + regular map_ptrs */
- size_t new_static_size = ZEND_MM_ALIGNED_SIZE_EX(zend_map_ptr_static_last, 4096);
+ size_t new_static_size = ZEND_MM_ALIGNED_SIZE_EX(zend_map_ptr_static_last, ZEND_MAP_PTR_CHUNK_SIZE);
if (zend_map_ptr_static_size != new_static_size) {
void *new_base = pemalloc((new_static_size + CG(map_ptr_size)) * sizeof(void *), 1);
if (CG(map_ptr_real_base)) {