Changeset 205
- Timestamp:
- 05/04/06 15:00:20 (2 years ago)
- Files:
-
- eaccelerator/trunk/ChangeLog (modified) (1 diff)
- eaccelerator/trunk/ea_restore.c (modified) (6 diffs)
- eaccelerator/trunk/ea_store.c (modified) (6 diffs)
- eaccelerator/trunk/eaccelerator.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
eaccelerator/trunk/ChangeLog
r204 r205 1 2006-05-04 Bart Vanbrabant <bart.vanbrabant at zoeloelip.be> 2 3 * Don't store the doc_comments in op_array and class_entry. They are 4 useless. this should reduce memory footprint. 5 1 6 2006-04-13 Bart Vanbrabant <bart.vanbrabant at zoeloelip.be> 2 7 eaccelerator/trunk/ea_restore.c
r201 r205 256 256 #endif 257 257 FIXUP(from->filename); 258 #ifdef ZEND_ENGINE_2259 FIXUP(from->doc_comment);260 #endif261 258 } 262 259 … … 267 264 #ifdef ZEND_ENGINE_2 268 265 FIXUP(from->filename); 269 FIXUP(from->doc_comment);270 266 fixup_zval_hash(&from->constants_table); 271 267 fixup_zval_hash(&from->default_properties); … … 648 644 to->line_start = from->line_start; 649 645 to->line_end = from->line_end; 650 to->doc_comment_len = from->doc_comment_len; 651 to->doc_comment = from->doc_comment; 652 /*??? 653 if (from->doc_comment != NULL) { 654 to->doc_comment = emalloc(from->doc_comment_len+1); 655 memcpy(to->doc_comment, from->doc_comment, from->doc_comment_len+1); 656 } 657 */ 646 to->doc_comment_len = 0; 647 to->doc_comment = NULL; 658 648 #else 659 649 to->uses_globals = from->uses_globals; … … 709 699 memcpy(to->name, from->name, from->name_length + 1); 710 700 #ifdef ZEND_ENGINE_2_1 711 if (from->doc_comment != NULL) { 712 to->doc_comment = emalloc(from->doc_comment_len+1); 713 memcpy(to->doc_comment, from->doc_comment, from->doc_comment_len+1); 714 } 701 to->doc_comment_len = 0; 702 to->doc_comment = NULL; 715 703 #endif 716 704 return to; … … 857 845 to->line_start = from->line_start; 858 846 to->line_end = from->line_end; 859 to->doc_comment_len = from->doc_comment_len; 847 to->doc_comment_len = 0; 848 to->doc_comment = NULL; 860 849 /* if (from->filename != NULL) { 861 850 size_t len = strlen(from->filename) + 1; … … 864 853 }*/ 865 854 to->filename = from->filename; 866 if (from->doc_comment != NULL) {867 to->doc_comment = emalloc(from->doc_comment_len + 1);868 memcpy(to->doc_comment, from->doc_comment, from->doc_comment_len + 1);869 }870 855 871 856 /* restore constants table */ eaccelerator/trunk/ea_store.c
r201 r205 79 79 EAG(mem) += sizeof(zend_property_info); 80 80 calc_string(from->name, from->name_length + 1 TSRMLS_CC); 81 #ifdef ZEND_ENGINE_2_182 if (from->doc_comment != NULL) {83 calc_string(from->doc_comment, from->doc_comment_len + 1 TSRMLS_CC);84 }85 #endif86 81 } 87 82 … … 263 258 if (from->filename != NULL) 264 259 calc_string(from->filename, strlen(from->filename) + 1 TSRMLS_CC); 265 #ifdef ZEND_ENGINE_2266 if (from->doc_comment != NULL)267 calc_string(from->doc_comment, from->doc_comment_len + 1 TSRMLS_CC);268 #endif269 260 } 270 261 … … 286 277 if (from->filename != NULL) 287 278 calc_string(from->filename, strlen(from->filename) + 1 TSRMLS_CC); 288 if (from->doc_comment != NULL) 289 calc_string(from->doc_comment, from->doc_comment_len + 1 TSRMLS_CC); 290 291 calc_zval_hash(&from->constants_table); 279 280 calc_zval_hash(&from->constants_table); 292 281 calc_zval_hash(&from->default_properties); 293 282 … … 729 718 to->line_start = from->line_start; 730 719 to->line_end = from->line_end; 731 to->doc_comment_len = from->doc_comment_len;732 if (from->doc_comment != NULL)733 to->doc_comment = store_string(from->doc_comment, from->doc_comment_len + 1 TSRMLS_CC);734 720 #endif 735 721 return to; … … 746 732 to->name = store_string(from->name, from->name_length + 1 TSRMLS_CC); 747 733 #ifdef ZEND_ENGINE_2_1 748 to->doc_comment_len = from->doc_comment_len; 749 if (from->doc_comment != NULL) { 750 to->doc_comment = store_string(from->doc_comment, from->doc_comment_len + 1 TSRMLS_CC); 751 } 734 to->doc_comment_len = 0; 735 to->doc_comment = NULL; 752 736 #endif 753 737 return to; … … 893 877 to->line_start = from->line_start; 894 878 to->line_end = from->line_end; 895 to->doc_comment_len = from->doc_comment_len;896 879 897 880 if (from->filename != NULL) 898 881 to->filename = store_string(from->filename, strlen(from->filename) + 1 TSRMLS_CC); 899 if (from->doc_comment != NULL)900 to->doc_comment = store_string(from->doc_comment, from->doc_comment_len + 1 TSRMLS_CC);901 882 902 883 store_zval_hash(&to->constants_table, &from->constants_table); eaccelerator/trunk/eaccelerator.h
r195 r205 217 217 zend_uint line_start; 218 218 zend_uint line_end; 219 char *doc_comment;220 zend_uint doc_comment_len;221 219 #endif 222 220 } eaccelerator_op_array; … … 243 241 zend_uint line_start; 244 242 zend_uint line_end; 245 char *doc_comment;246 zend_uint doc_comment_len;247 243 #endif 248 244 } eaccelerator_class_entry;