summaryrefslogtreecommitdiff
path: root/processor
diff options
context:
space:
mode:
authorXuefer <xuefer@gmail.com>2013-12-13 07:28:45 +0000
committerXuefer <xuefer@gmail.com>2013-12-13 07:28:45 +0000
commit7b4722df0fad260ff6a66b229cf4276ccd3a5e3e (patch)
tree2337ad5b3fd068c5e5daa9bc61a8d2ad133e3b5c /processor
parent501bbf2e0f5ac94e6d1f3f430833353a78081add (diff)
downloadxcache-7b4722df0fad260ff6a66b229cf4276ccd3a5e3e.tar.gz
xcache-7b4722df0fad260ff6a66b229cf4276ccd3a5e3e.zip
fixed #333: reduce memory usage for small or empty files
git-svn-id: svn://svn.lighttpd.net/xcache/trunk@1478 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
Diffstat (limited to 'processor')
-rw-r--r--processor/processor.m414
1 files changed, 8 insertions, 6 deletions
diff --git a/processor/processor.m4 b/processor/processor.m4
index 9eaedb4..3f3e43b 100644
--- a/processor/processor.m4
+++ b/processor/processor.m4
@@ -749,22 +749,24 @@ DEF_STRUCT_P_FUNC(`zend_op_array', , `dnl {{{
/* deep */
STRUCT_P(HashTable, static_variables, HashTable_zval_ptr)
#ifdef ZEND_ENGINE_2
- STRUCT_ARRAY(zend_uint, num_args, zend_arg_info, arg_info)
- gc_arg_info = 1;
+ if (SRC(`arg_info')) {
+ gc_arg_info = 1;
+ STRUCT_ARRAY(zend_uint, num_args, zend_arg_info, arg_info)
+ }
#endif
DST(`filename') = processor->entry_php_src->filepath;
+
#ifdef ZEND_ENGINE_2_4
- if (SRC(`literals')) {
+ if (SRC(`literals') && op_array_info->literalinfo_cnt) {
gc_opcodes = 1;
- if (op_array_info->literalinfo_cnt) {
- gc_literals = 1;
- }
+ gc_literals = 1;
}
#else
if (op_array_info->oplineinfo_cnt) {
gc_opcodes = 1;
}
#endif
+
#ifdef ZEND_ENGINE_2_4
if (gc_literals) {
dnl used when copying opcodes