Subject: Re: [boost] Proposal: Monotonic Containers - Comparison with boost::pool, boost::fast_pool and TBB
From: Stewart, Robert (Robert.Stewart_at_[hidden])
Date: 2009-06-23 11:49:14
Simonson, Lucanus J wrote
On Tuesday, June 23, 2009 11:38 AM
> For multiple threads to
> use the allocator without interacting (we would prefer not to
> pay for locks if we aren't actually sharing information
> between threads) the allocator must differ by type. The only
> way that can be accomplished is if every thread calls a
> different function with a diferent instantiation of the
> allocator. We don't want to instantiate dozens of copies of
> the same functions at compile time to support many threads.
Only the storage need be unique in each case. Factor out the code that doesn't depend upon the tag type -- the behavior -- from that which does.
That said, it would be painful to create unique tags for each thread. Is it a problem for the allocator to look in TLS for that thread's storage?
Rob Stewart robert.stewart_at_[hidden]
Software Engineer, Core Software using std::disclaimer;
Susquehanna International Group, LLP http://www.sig.com
IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk