Subj : Re: Lock Free -- where to start To : comp.programming.threads From : chris noonan Date : Thu Oct 06 2005 12:17 pm Oliver S. wrote: > >> If you really need performance, use thread-local pooling for > >> memory allocations (the local pool may swap memory-blocks with > > a global pool) > > > Swapping memory blocks - is that some sort of moveable memory? > > No, it just makes sense to give back pooled memory when the > thread-local pool's size becomes to large. > > >> and if you need even more performance, use thread-local pools > >> for equally sized objects. That's a magnitude faster than lock-free > >> allocations on a global heap. > > > Which measurements of which lock-free allocator with a > > global heap are you referring to? > > I don't need any concrete implementation to claim, that thread-local > pooling with equally sized-blocks ist much faster than any lock-free > allocator. "A magnitude faster"? I think you do. In any case your thread-local pool method could form the basis of a lock-free allocator, rather than be contrasted to one. But you omit to say how a memory block in a thread-local pool could be freed by a thread other than the one that allocated it. That is possible to arrange (Pentium processor) without a lock or even a bus-locking instruction, but the extra complexity involved will negate to some extent the time saved. Chris .