Changeset 1151
- Timestamp:
- 2012-10-10T14:15:34+02:00 (8 months ago)
- Location:
- trunk
- Files:
-
- 4 edited
-
mod_cacher/xc_cacher.c (modified) (6 diffs)
-
mod_coverager/xc_coverager.c (modified) (2 diffs)
-
mod_optimizer/xc_optimizer.c (modified) (2 diffs)
-
xcache/xc_compatibility.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/mod_cacher/xc_cacher.c
r1150 r1151 763 763 ALLOCA_FLAG(use_heap) 764 764 /* new ptr which is stored inside CG(class_table) */ 765 xc_cest_t **new_cest_ptrs = (xc_cest_t **) my_do_alloca(sizeof(xc_cest_t*) * p->classinfo_cnt, use_heap);765 xc_cest_t **new_cest_ptrs = (xc_cest_t **)xc_do_alloca(sizeof(xc_cest_t*) * p->classinfo_cnt, use_heap); 766 766 #endif 767 767 … … 829 829 830 830 #ifndef ZEND_ENGINE_2 831 my_free_alloca(new_cest_ptrs, use_heap);831 xc_free_alloca(new_cest_ptrs, use_heap); 832 832 #endif 833 833 CG(active_op_array) = old_active_op_array; … … 950 950 951 951 size = strlen(PG(include_path)) + 1; 952 paths = (char *) my_do_alloca(size, use_heap);952 paths = (char *)xc_do_alloca(size, use_heap); 953 953 memcpy(paths, PG(include_path), size); 954 954 … … 985 985 986 986 finish: 987 my_free_alloca(paths, use_heap);987 xc_free_alloca(paths, use_heap); 988 988 989 989 return ret; … … 2549 2549 name##_buffer.alloca_size = xc_var_buffer_alloca_size(name TSRMLS_CC); \ 2550 2550 name##_buffer.buffer = name##_buffer.alloca_size \ 2551 ? my_do_alloca(name##_buffer.alloca_size, name##_buffer.useheap) \2551 ? xc_do_alloca(name##_buffer.alloca_size, name##_buffer.useheap) \ 2552 2552 : UNISW(Z_STRVAL_P(name), Z_TYPE(name) == IS_UNICODE ? Z_USTRVAL_P(name) : Z_STRVAL_P(name)); \ 2553 2553 if (name##_buffer.alloca_size) xc_var_buffer_init(name##_buffer.buffer, name TSRMLS_CC); … … 2555 2555 #define VAR_BUFFER_FREE(name) \ 2556 2556 if (name##_buffer.alloca_size) { \ 2557 my_free_alloca(name##_buffer.buffer, name##_buffer.useheap); \2557 xc_free_alloca(name##_buffer.buffer, name##_buffer.useheap); \ 2558 2558 } 2559 2559 -
trunk/mod_coverager/xc_coverager.c
r1118 r1151 47 47 48 48 TRACE("mkdirs %s %d %s %d", root, rootlen, path, pathlen); 49 fullpath = my_do_alloca(rootlen + pathlen + 1, use_heap);49 fullpath = xc_do_alloca(rootlen + pathlen + 1, use_heap); 50 50 memcpy(fullpath, root, rootlen); 51 51 memcpy(fullpath + rootlen, path, pathlen); … … 68 68 #endif 69 69 } 70 my_free_alloca(fullpath, use_heap);70 xc_free_alloca(fullpath, use_heap); 71 71 } 72 72 /* }}} */ -
trunk/mod_optimizer/xc_optimizer.c
r1112 r1151 392 392 ALLOCA_FLAG(use_heap_catchbbids) 393 393 ALLOCA_FLAG(use_heap_markbbhead) 394 bbid_t *bbids = my_do_alloca(count * sizeof(bbid_t), use_heap_bbids);395 #ifdef ZEND_ENGINE_2 396 bbid_t *catchbbids = my_do_alloca(count * sizeof(bbid_t), use_heap_catchbbids);397 #endif 398 zend_bool *markbbhead = my_do_alloca(count * sizeof(zend_bool), use_heap_markbbhead);394 bbid_t *bbids = xc_do_alloca(count * sizeof(bbid_t), use_heap_bbids); 395 #ifdef ZEND_ENGINE_2 396 bbid_t *catchbbids = xc_do_alloca(count * sizeof(bbid_t), use_heap_catchbbids); 397 #endif 398 zend_bool *markbbhead = xc_do_alloca(count * sizeof(zend_bool), use_heap_markbbhead); 399 399 400 400 /* {{{ mark jmpin/jumpout */ … … 503 503 /* }}} */ 504 504 505 my_free_alloca(markbbhead, use_heap_markbbhead);506 #ifdef ZEND_ENGINE_2 507 my_free_alloca(catchbbids, use_heap_catchbbids);508 #endif 509 my_free_alloca(bbids, use_heap_bbids);505 xc_free_alloca(markbbhead, use_heap_markbbhead); 506 #ifdef ZEND_ENGINE_2 507 xc_free_alloca(catchbbids, use_heap_catchbbids); 508 #endif 509 xc_free_alloca(bbids, use_heap_bbids); 510 510 return SUCCESS; 511 511 } -
trunk/xcache/xc_compatibility.h
r1044 r1151 38 38 39 39 #ifdef do_alloca_with_limit 40 # define my_do_alloca(size, use_heap) do_alloca_with_limit(size, use_heap)41 # define my_free_alloca(size, use_heap) free_alloca_with_limit(size, use_heap)40 # define xc_do_alloca(size, use_heap) do_alloca_with_limit(size, use_heap) 41 # define xc_free_alloca(size, use_heap) free_alloca_with_limit(size, use_heap) 42 42 #elif defined(ALLOCA_FLAG) 43 # define my_do_alloca(size, use_heap) do_alloca(size, use_heap)44 # define my_free_alloca(size, use_heap) free_alloca(size, use_heap)45 #else 46 # define my_do_alloca(size, use_heap) do_alloca(size)47 # define my_free_alloca(size, use_heap) free_alloca(size)43 # define xc_do_alloca(size, use_heap) do_alloca(size, use_heap) 44 # define xc_free_alloca(size, use_heap) free_alloca(size, use_heap) 45 #else 46 # define xc_do_alloca(size, use_heap) do_alloca(size) 47 # define xc_free_alloca(size, use_heap) free_alloca(size) 48 48 # define ALLOCA_FLAG(x) 49 49 #endif … … 68 68 /* {{{ dirty fix for PHP 6 */ 69 69 #ifdef add_assoc_long_ex 70 static inline void my_add_assoc_long_ex(zval *arg, char *key, uint key_len, long value)70 static inline void xc_add_assoc_long_ex(zval *arg, char *key, uint key_len, long value) 71 71 { 72 72 add_assoc_long_ex(arg, key, key_len, value); 73 73 } 74 74 # undef add_assoc_long_ex 75 # define add_assoc_long_ex my_add_assoc_long_ex75 # define add_assoc_long_ex xc_add_assoc_long_ex 76 76 #endif 77 77 #ifdef add_assoc_bool_ex 78 static inline void my_add_assoc_bool_ex(zval *arg, char *key, uint key_len, zend_bool value)78 static inline void xc_add_assoc_bool_ex(zval *arg, char *key, uint key_len, zend_bool value) 79 79 { 80 80 add_assoc_bool_ex(arg, key, key_len, value); 81 81 } 82 82 # undef add_assoc_bool_ex 83 # define add_assoc_bool_ex my_add_assoc_bool_ex83 # define add_assoc_bool_ex xc_add_assoc_bool_ex 84 84 #endif 85 85 #ifdef add_assoc_null_ex 86 static inline void my_add_assoc_null_ex(zval *arg, char *key, uint key_len)86 static inline void xc_add_assoc_null_ex(zval *arg, char *key, uint key_len) 87 87 { 88 88 add_assoc_null_ex(arg, key, key_len); 89 89 } 90 90 # undef add_assoc_null_ex 91 # define add_assoc_null_ex my_add_assoc_null_ex91 # define add_assoc_null_ex xc_add_assoc_null_ex 92 92 #endif 93 93 /* }}} */
Note: See TracChangeset
for help on using the changeset viewer.

