Boost logo

Boost Users :

Subject: Re: [Boost-users] [pool] Crash when attempting to call malloc (1.32)
From: Filip Konvička (filip.konvicka_at_[hidden])
Date: 2009-06-17 04:00:55


> Also, about threads. This is being malloced/free in two separate
> threads, however I sort of assumed that pool was thread safe because of
> discussion about using boost::thread instead of their current scheme for
> thread safety on another mailing list. Was my assumption wrong, i.e.
> pool is not thread safe?

The pool allocators are thread safe, pool as such is not.

> (I am a little hesitant to blame this completely on threading without
> searching a bit elsewhere because of the way the three threads operate,
> there is very little chance they are stomping over the pool, and the
> other threads are also all in wait states when this occurs)

I have reviewed the pool code quite thoroughly after having some issues
with it, and I think the code is OK in the Boost version that I'm using
now (1.38).

Cheers,
Filip


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net