diff options
author | Dmitry Stogov <dmitry@php.net> | 2010-04-20 11:07:05 +0000 |
---|---|---|
committer | Dmitry Stogov <dmitry@php.net> | 2010-04-20 11:07:05 +0000 |
commit | 41b6410418cb52b5fbb76f99cadab3bf2ce336a0 (patch) | |
tree | 9d2dc05f4ee3474f1b19656df071b186800d6112 /main/main.c | |
parent | dd5c478be61a0ef94b54837cfa875c964356e14f (diff) | |
download | php-git-41b6410418cb52b5fbb76f99cadab3bf2ce336a0.tar.gz |
Added concept of interned strings. All strings constants known at compile time are allocated in a single copy and never changed.
Diffstat (limited to 'main/main.c')
-rw-r--r-- | main/main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/main/main.c b/main/main.c index e6b6496133..3079bd000b 100644 --- a/main/main.c +++ b/main/main.c @@ -1508,6 +1508,7 @@ void php_request_shutdown_for_exec(void *dummy) /* 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 @@ void php_request_shutdown_for_hook(void *dummy) 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 @@ void php_request_shutdown(void *dummy) 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 @@ int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_mod module_startup = 0; shutdown_memory_manager(1, 0 TSRMLS_CC); + CG(interned_strings_snapshot)(TSRMLS_C); /* we're done */ return SUCCESS; |