# define ZEND_ALLOCA_MAX_SIZE (32 * 1024)
# define ALLOCA_FLAG(name) \
zend_bool name;
+# define SET_ALLOCA_FLAG(name) \
+ name = 1
# define do_alloca_ex(size, limit, use_heap) \
((use_heap = (UNEXPECTED((size) > (limit)))) ? emalloc(size) : alloca(size))
# define do_alloca(size, use_heap) \
do { if (UNEXPECTED(use_heap)) efree(p); } while (0)
#else
# define ALLOCA_FLAG(name)
+# define SET_ALLOCA_FLAG(name)
# define do_alloca(p, use_heap) emalloc(p)
# define free_alloca(p, use_heap) efree(p)
#endif
if (EXPECTED(op_array->T < TEMP_VAR_STACK_LIMIT && op_array->last_var < TEMP_VAR_STACK_LIMIT)) {
EX(CVs) = (zval***)do_alloca(sizeof(zval**) * op_array->last_var + sizeof(temp_variable) * op_array->T, EX(use_heap));
} else {
- EX(use_heap) = 1;
+ SET_ALLOCA_FLAG(EX(use_heap));
EX(CVs) = (zval***)safe_emalloc(sizeof(temp_variable), op_array->T, sizeof(zval**) * op_array->last_var);
}
EX(Ts) = (temp_variable *)(EX(CVs) + op_array->last_var);
if (EXPECTED(op_array->T < TEMP_VAR_STACK_LIMIT && op_array->last_var < TEMP_VAR_STACK_LIMIT)) {
EX(CVs) = (zval***)do_alloca(sizeof(zval**) * op_array->last_var + sizeof(temp_variable) * op_array->T, EX(use_heap));
} else {
- EX(use_heap) = 1;
+ SET_ALLOCA_FLAG(EX(use_heap));
EX(CVs) = (zval***)safe_emalloc(sizeof(temp_variable), op_array->T, sizeof(zval**) * op_array->last_var);
}
EX(Ts) = (temp_variable *)(EX(CVs) + op_array->last_var);