Changeset 854 for trunk/xcache.h


Ignore:
Timestamp:
2012-03-28T10:48:20+02:00 (2 years ago)
Author:
moo
Message:

remove type/cache/hvalue from cached copy to reduce memory usage a little bit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/xcache.h

    r851 r854  
    355355/* }}} */ 
    356356#endif 
    357 typedef enum { XC_TYPE_PHP, XC_TYPE_VAR } xc_entry_type_t; 
    358357typedef struct { 
    359358    char digest[16]; 
     
    369368/* {{{ xc_entry_data_php_t */ 
    370369struct _xc_entry_data_php_t { 
     370    xc_entry_data_php_t *next; 
    371371    xc_hash_value_t      hvalue; 
    372     xc_entry_data_php_t *next; 
    373     xc_cache_t          *cache; 
    374372 
    375373    xc_md5sum_t md5;        /* md5sum of the source */ 
     
    410408}; 
    411409/* }}} */ 
    412 /* {{{ xc_entry_data_var_t */ 
    413 typedef struct { 
    414     zval   *value; 
    415  
    416     zend_bool  have_references; 
    417 } xc_entry_data_var_t; 
    418 /* }}} */ 
    419410typedef zvalue_value xc_entry_name_t; 
    420411/* {{{ xc_entry_t */ 
    421412struct _xc_entry_t { 
    422     xc_hash_value_t hvalue; 
    423     xc_entry_t     *next; 
    424     xc_cache_t     *cache; 
    425  
    426     xc_entry_type_t type; 
    427     size_t          size; 
    428  
     413    xc_entry_t *next; 
     414 
     415    size_t     size; 
    429416    time_t     ctime;           /* creation ctime of this entry */ 
    430417    time_t     atime;           /*   access atime of this entry */ 
     
    437424#endif 
    438425    xc_entry_name_t name; 
    439  
    440     union { 
    441         xc_entry_data_php_t *php; 
    442         xc_entry_data_var_t var; 
    443     } data; 
    444426}; 
    445427 
    446428typedef struct { 
    447429    xc_entry_t entry; 
     430    xc_entry_data_php_t *php; 
    448431 
    449432    zend_ulong refcount;    /* count of php instances holding this entry */ 
     
    466449} xc_entry_php_t; 
    467450/* }}} */ 
     451typedef struct { 
     452    xc_entry_t entry; 
     453    zval      *value; 
     454    zend_bool  have_references; 
     455} xc_entry_var_t; 
     456/* }}} */ 
     457typedef struct xc_entry_hash_t { /* {{{ */ 
     458    xc_hash_value_t cacheslotid; 
     459    xc_hash_value_t entryslotid; 
     460} xc_entry_hash_t; 
     461/* }}} */ 
    468462 
    469463extern zend_module_entry xcache_module_entry; 
Note: See TracChangeset for help on using the changeset viewer.