Re: [xml] too many mallocs?



On Tue, May 21, 2002 at 08:19:55PM +1000, Robert Collins wrote:


-----Original Message-----
From: Daniel Veillard [mailto:veillard redhat com] 
Sent: Tuesday, May 21, 2002 4:38 PM

  Well some people suggested dropping xmlMalloc/xmlFree
to use alloca() in some context where the result is discarded 
anyway, but I'm not too fond of this.

alloca is much more efficient on most platforms, as it allocs out of the
stack, saving heap free list manipulation/searching.

  and avoiding reentrancy allocation work on threaded apps too

What hesitations do you have about alloca?

  portability, and making sure it won't break existing code.

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]