Changeset 1478 in svn for trunk/processor/processor.m4


Ignore:
Timestamp:
2013-12-13T08:28:45+01:00 (19 months ago)
Author:
Xuefer
Message:

fixed #333: reduce memory usage for small or empty files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/processor/processor.m4

    r1473 r1478  
    750750        STRUCT_P(HashTable, static_variables, HashTable_zval_ptr)
    751751#ifdef ZEND_ENGINE_2
    752         STRUCT_ARRAY(zend_uint, num_args, zend_arg_info, arg_info)
    753         gc_arg_info = 1;
     752        if (SRC(`arg_info')) {
     753            gc_arg_info = 1;
     754            STRUCT_ARRAY(zend_uint, num_args, zend_arg_info, arg_info)
     755        }
    754756#endif
    755757        DST(`filename') = processor->entry_php_src->filepath;
    756 #ifdef ZEND_ENGINE_2_4
    757         if (SRC(`literals')) {
     758
     759#ifdef ZEND_ENGINE_2_4
     760        if (SRC(`literals') && op_array_info->literalinfo_cnt) {
    758761            gc_opcodes = 1;
    759             if (op_array_info->literalinfo_cnt) {
    760                 gc_literals = 1;
    761             }
     762            gc_literals = 1;
    762763        }
    763764#else
     
    766767        }
    767768#endif
     769
    768770#ifdef ZEND_ENGINE_2_4
    769771        if (gc_literals) {
Note: See TracChangeset for help on using the changeset viewer.