Boost logo

Threads-Devel :

From: Felipe Magno de Almeida (felipe.m.almeida_at_[hidden])
Date: 2007-07-26 22:38:13

Sorry replying to myself, but just after I sent the message I figured
it isn't possible.
The tss must have a unique identifier that is equal throughout all threads.
It should be possible to use the tss address as a key to some sort of
map/hash, where it would contain the value. It wouldn't be O(1), but
having it growing unbounded is IMO, worse. At least for my use case.

On 7/26/07, Felipe Magno de Almeida <felipe.m.almeida_at_[hidden]> wrote:
> Hi,
> On a very heavy thread_specific_ptr creation and destruction, e.g.
> spirit grammar with closure instantiation, the vector size becomes
> easily *big*, and the boost::function<void, void*>* isn't ever
> deleted.
> So the application rapidly becomes very memory-consuming (hundreds of
> megabytes).
> Could tss uses a list and have tss point to it through a list iterator?
> And delete the function when tss is destroyed? (Why isn't
> boost::function passed by-value anyway?).
> Best regards,
> --
> Felipe Magno de Almeida

Felipe Magno de Almeida

Threads-Devel list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at