Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2(PHP_5_2) / zend.h zend_API.c zend_builtin_functions.c zend_compile.c zend_execute_API.c zend_object_handlers.c
/tests bug43128.phpt php-src NEWS
| From: | Dmitry Stogov | Date: | Sat, 16 Feb 2008 10:59:12 +0000 |
| Subject: | Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2(PHP_5_2) / zend.h zend_API.c zend_builtin_functions.c zend_compile.c zend_execute_API.c zend_object_handlers.c /tests bug43128.phpt php-src NEWS |
||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.zend-engine.cvs |
| Request: | Send a blank email to php-zend-engine-cvs+get-6418@lists.php.net to get a copy of this message | ||
Marcus Boerger wrote:
Hello Stanislav, well in this case as well as in most other cases we deal with unrestricted lengths. So adding an additional complexity does not seem very good imo. Also we agreed on alloca when there is no function call befween alloca and its free_alloca.How function between alloca() and free_alooca() (that actually NOP) may break something? From my experience it's may be dangerous to use alloca() in the loop, because stack grows on each iteration and never came back before return. (I have removed such alloca() usage in the patch).
Btw, from the manpage: The alloca() function is machine and compiler dependent. On many sys- tems its implementation is buggy. Its use is discouraged. [...]Especially for this reason we use do_alloca() macros that uses emalloc() on such systems. Thanks. Dmitry.
marcus Friday, February 15, 2008, 10:14:52 PM, you wrote:intersting change on the Zend side of PHP then. I remember that you guys were pretty much against any use of alloca. But well as long as you do it...I don't remember being against any use of alloca()... IMHO alloca() is OK as long as it is used for short things that live very short time (like temp strings).Best regards, Marcus