Rici Lake wrote:

> I favour having ap_pass_brigade do it.

 ... as discussed in IRC.  Yes, I like that too.

> However, I think it is a fallacy that a cleaned-up brigade is not too
> big to wait for pool cleanup. The brigade itself is about four pointers;
> and the corresponding pool cleanup is another four pointers, so that's a
> total of around 32 bytes, not a lot. But suppose that a brigade is
> created for every 8k of filtered data,

Hmmm.

Are there applications like that in the wild?  I'd have thought that
sounds like the kind of case where you definitely want to re-use
one brigade, with a brigade_cleanup after each 8Kb pass_brigade.
To create and destroy half a million brigades, including of course
registering and removing their cleanups, seems well worth avoiding.
So long as the creator is responsible (and the brigade guaranteed
to be reusable), that is trivial for the programmer.

-- 
Nick Kew

Reply via email to