Commit:    3ae5c55596c34cefa1a78b971df1ffffce5cf4a7
Author:    Dmitry Stogov <dmi...@zend.com>         Thu, 28 Mar 2013 13:45:40 
+0400
Parents:   037ea6f36076f9f213cec2f305b8a395f4f40897
Branches:  PHP-5.5 master

Link:       
http://git.php.net/?p=php-src.git;a=commitdiff;h=3ae5c55596c34cefa1a78b971df1ffffce5cf4a7

Log:
don't optimize script if it's not going to be cached

Changed paths:
  M  ext/opcache/ZendAccelerator.c


Diff:
diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c
index 5d5de44..168082e 100644
--- a/ext/opcache/ZendAccelerator.c
+++ b/ext/opcache/ZendAccelerator.c
@@ -2686,7 +2686,11 @@ static void accel_op_array_handler(zend_op_array 
*op_array)
 {
        TSRMLS_FETCH();
 
-       if (ZCG(enabled) && accel_startup_ok && ZCSG(accelerator_enabled)) {
+       if (ZCG(enabled) &&
+           accel_startup_ok &&
+           ZCSG(accelerator_enabled) &&
+           !ZSMMG(memory_exhausted) &&
+           !ZCSG(restart_pending)) {
                zend_optimizer(op_array TSRMLS_CC);
        }
 }


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to