summaryrefslogtreecommitdiff
path: root/ext/opcache
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2013-12-26 14:47:13 +0400
committerDmitry Stogov <dmitry@zend.com>2013-12-26 14:47:13 +0400
commit03a37de9b3c4b9dc02aeeb5c5331ff89eac62515 (patch)
treeaf2bddce7eea0c93b06e1bbfd6c9b06b2b7e43db /ext/opcache
parent0ff0e82f26fcae352007c08873ab408c12948ad9 (diff)
downloadphp-git-03a37de9b3c4b9dc02aeeb5c5331ff89eac62515.tar.gz
Improved empty string handling. Now ZE uses an interned string instead of allocation new empty string each time. (Some extensions might need to be fixed using str_efree() instead of efree() to support interned strings).
Diffstat (limited to 'ext/opcache')
-rw-r--r--ext/opcache/ZendAccelerator.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c
index ac6ee1e0bd..e12f0b981a 100644
--- a/ext/opcache/ZendAccelerator.c
+++ b/ext/opcache/ZendAccelerator.c
@@ -387,6 +387,9 @@ static void accel_use_shm_interned_strings(TSRMLS_D)
{
Bucket *p, *q;
+ /* empty string */
+ CG(interned_empty_string) = accel_new_interned_string("", sizeof(""), 0 TSRMLS_CC);
+
/* function table hash keys */
p = CG(function_table)->pListHead;
while (p) {