diff options
author | Dmitry Stogov <dmitry@zend.com> | 2013-12-26 14:47:13 +0400 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2013-12-26 14:47:13 +0400 |
commit | 03a37de9b3c4b9dc02aeeb5c5331ff89eac62515 (patch) | |
tree | af2bddce7eea0c93b06e1bbfd6c9b06b2b7e43db /ext/opcache | |
parent | 0ff0e82f26fcae352007c08873ab408c12948ad9 (diff) | |
download | php-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.c | 3 |
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) { |