|
Boost Users : |
From: Eric Colleu (ecolleu_at_[hidden])
Date: 2006-06-22 10:36:57
Bruno Martínez a écrit :
> On Thu, 22 Jun 2006 06:15:58 -0300, Eric Colleu
> <ecolleu_at_[hidden]> wrote:
>
>
>> Hi,
>>
>> I'm using boost 1.33.1 on multi-processor plateform (2 Pentium4 3.2 GHz)
>> and Windows XP SP2 (compiled with MinGW).
>> I wrote a MessageQueue class which use boost::mutex and boost::condition
>> to wait for message and notify message reception (see code below)
>> I made a little test that create 2 boost::thread sending and receiving
>> messages in 2 queues.
>>
>
> I think you should poet the test.
>
> Bruno
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>
>
>
OK i found it finally.
In GCC (under Linux and Windows), there is an access to the
GLIBCPP_FORCE_NEW or GLIBCXX_FORCE_NEW environment variable (use a
memory cache by default instead of calling malloc / free directly). On a
multiprocessor system, this "optimisation" seems to be unstable. I set
this variable and the problem disapear.
So the problem is not in boost, sorry for my mistake.
Eric
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