On 3 September 2014 23:37, Jim Jagielski <[email protected]> wrote:
> Yeah, that thread, and Greg's work w/ pocore, are kind of
> the origins of this question. The thing is that awhile ago,
> (I mean way awhile ago), I recall us trying to simply replace
> pools w/ malloc/free (Paul was the main dude in this case)
> and we got terrible performance...
Simply replacing pools within malloc/free is not good idea IMO,
because nice thing about pools that it has very good performance for
small allocations because data allocated with minimum 8kb chunks. So
it benefits for typical code like this:
[[
some_t *s = apr_pcalloc(pool, sizeof(*s));
s->string1 = apr_pstrdup(pool, s);
s->something = arp_pcalloc(pool, 11)
]]

-- 
Ivan Zhakov

Reply via email to