com php-src: Make the expression more reasonble (by nikic): ext/opcache/ZendAccelerator.c
| From: | Xinchen Hui | Date: | Mon, 01 Aug 2016 12:20:01 +0000 |
| Subject: | com php-src: Make the expression more reasonble (by nikic): ext/opcache/ZendAccelerator.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-93507@lists.php.net to get a copy of this message | ||
Commit: f93061471b5541525a39821da70b674b830284df
Author: Xinchen Hui <laruence@gmail.com> Mon, 1 Aug 2016 20:20:01 +0800
Parents: 4d9195927a4c8c8adce84b57125e5b8d52461358
Branches: PHP-7.1 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f93061471b5541525a39821da70b674b830284df
Log:
Make the expression more reasonble (by nikic)
Changed paths:
M ext/opcache/ZendAccelerator.c
Diff:
diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c
index b04214b..769ce92 100644
--- a/ext/opcache/ZendAccelerator.c
+++ b/ext/opcache/ZendAccelerator.c
@@ -2445,7 +2445,7 @@ static int zend_accel_init_shm(void)
ZCSG(interned_strings_start) = ZCSG(interned_strings_end) = NULL;
# ifndef ZTS
- zend_hash_init(&ZCSG(interned_strings), (ZCG(accel_directives).interned_strings_buffer * 1024
* 1024) / (sizeof(Bucket) + sizeof(Bucket*) + 8 /* average string length */), NULL, NULL, 1);
+ zend_hash_init(&ZCSG(interned_strings), (ZCG(accel_directives).interned_strings_buffer * 1024
* 1024) / _ZSTR_STRUCT_SIZE(8 /* average string length */), NULL, NULL, 1);
if (ZCG(accel_directives).interned_strings_buffer) {
void *data;