Changeset 1478


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

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

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r1477 r1478  
    1212 * misc: 
    1313   * Reflection info added for APIs 
     14 
     153.2.0 2013-??-?? 
     16ChangeLog 
     17======== 
     18 * cacher: 
     19   * fixed #333: reduce memory usage for small or empty files 
    1420 
    15213.1.1 2013-??-?? 
  • trunk/NEWS

    r1476 r1478  
    114.0.0 2014-??-?? 
    2 ChangeLog 
    3 ======== 
    42 * api updates 
    53 * cache defragment, cache to disk 
    64 
     53.2.1 2013-??-?? 
     6======== 
     7 
    783.1.1 2013-??-?? 
     9======== 
    810 * compatible with bcompiler 
    911 
  • trunk/mod_cacher/xc_cacher.c

    r1477 r1478  
    865865    } 
    866866    CG(zend_lineno) = 0; 
    867 #endif 
    868  
    869     i = 1; 
    870 #ifndef ZEND_ENGINE_2_2 
    871     zend_hash_add(&EG(included_files), entry_php->entry.name.str.val, entry_php->entry.name.str.len+1, (void *)&i, sizeof(int), NULL); 
    872867#endif 
    873868 
     
    21882183    /* found entry */ 
    21892184    if (stored_entry && stored_php) { 
    2190         zend_llist_add_element(&CG(open_files), h); 
    21912185        return xc_compile_restore(stored_entry, stored_php TSRMLS_CC); 
    21922186    } 
  • 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.