[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Static pools?

From: Branko Čibej <brane_at_xbc.nu>
Date: 2003-03-09 22:37:09 CET

Matthew Hambley wrote:

>In message <20030308232656.A13671@lyra.org>
> Greg Stein <gstein@lyra.org> wrote:
>
>
>>I'm not clear on why you don't just malloc the thing? If you want memory
>>from the heap, and want it for the duration of the process, then just use
>>malloc. I'm not sure that a pool will buy you anything.
>>
>>
>
>Again, simple. I get a strong "malloc bad, apr_palloc good" vibe from this
>project.
>
>

Ah. Well, we use pools for a reason -- to simplify memory management. If
you just want to allocate a chunk of memory and never free it again, it
make more sense to use malloc (assuming, of course, that you do that
exactly once during the lifetime of a process).

-- 
Brane Čibej   <brane_at_xbc.nu>   http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Mar 9 22:37:48 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.