dmitry                                   Tue, 20 Apr 2010 11:07:05 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=298205

Log:
Added concept of interned strings. All strings constants known at compile time 
are allocated in a single copy and never changed.

Changed paths:
    U   php/php-src/trunk/main/main.c

Modified: php/php-src/trunk/main/main.c
===================================================================
--- php/php-src/trunk/main/main.c       2010-04-20 11:05:54 UTC (rev 298204)
+++ php/php-src/trunk/main/main.c       2010-04-20 11:07:05 UTC (rev 298205)
@@ -1508,6 +1508,7 @@
        /* used to close fd's in the 3..255 range here, but it's problematic
         */
        shutdown_memory_manager(1, 1 TSRMLS_CC);
+       CG(interned_strings_restore)(TSRMLS_C);
 }
 /* }}} */

@@ -1550,6 +1551,8 @@
                shutdown_memory_manager(CG(unclean_shutdown), 0 TSRMLS_CC);
        } zend_end_try();

+       CG(interned_strings_restore)(TSRMLS_C);
+
        zend_try {
                zend_unset_timeout(TSRMLS_C);
        } zend_end_try();
@@ -1648,6 +1651,7 @@
        zend_try {
                shutdown_memory_manager(CG(unclean_shutdown) || 
!report_memleaks, 0 TSRMLS_CC);
        } zend_end_try();
+       CG(interned_strings_restore)(TSRMLS_C);

        /* 12. Reset max_execution_time */
        zend_try {
@@ -2103,6 +2107,7 @@
        module_startup = 0;

        shutdown_memory_manager(1, 0 TSRMLS_CC);
+       CG(interned_strings_snapshot)(TSRMLS_C);

        /* we're done */
        return SUCCESS;

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

Reply via email to