Re: cvs: pecl /tidy tidy.c
| From: | Andi Gutmans | Date: | Wed, 17 Dec 2003 16:24:41 +0000 |
| Subject: | Re: cvs: pecl /tidy tidy.c | ||
| References: | 1 2 | Groups: | php.pecl.cvs |
| Request: | Send a blank email to pecl-cvs+get-590@lists.php.net to get a copy of this message | ||
At 10:39 AM 12/17/2003 -0500, Ilia Alshanetsky wrote:
On December 17, 2003 05:00 am, Andi Gutmans wrote: I don't understand this. You should always be using emalloc/efree even without memory limit because it's PHP's safety net for per-request leaks. It would be really bad if you're using malloc/free. I have confirmed on numerous files that libtidy does not leak (valgrind), so there is not advantage of using Zend allocation macros. More over using them results in 10-15% increase in memory usage and performance drop of roughly 100%.I don't believe that 100% number (maybe in debug). In any case, it is important because in certain fatal errors your shutdown function might not be able to free all of the memory but the memory manager will do so. Also MT environments are handled much better with the new memory manager than standard malloc. You should use emalloc()/efree(). Why do you want to be different than other extensions? This has been a long lasting rule in PHP development. Andi