> -----Ursprüngliche Nachricht----- > > Im Auftrag von Justin Erenkrantz > Gesendet: Dienstag, 11. Dezember 2007 11:05 > An: [email protected] > Betreff: Re: Apache memory usage > > > On Dec 10, 2007 10:42 PM, Stefan Fritsch wrote: > > Yes, that works as well. I wanted to avoid calling > APR_BRIGADE_PREPEND > > when the temporary brigade is empty. But I don't really know whether > > APR_BRIGADE_PREPEND is so expensive that this makes sense. An > > alternative would be to check this using APR_BRIGADE_EMPTY. > > FWIW, as the brigade is a ring (read: dual-linked list), prepend or > append are both constant-time operations - on the order of maybe 2-3 > instructions. > > IOW, it's cheap. -- justin
Additionally, the first thing the macro does is checking whether the brigade is empty :-). Regards Rüdiger
