Boost logo

Boost :

From: scleary_at_[hidden]
Date: 2001-08-27 08:28:02


> As it is specified in comments in
> boost/pool/simple_segregated_storage.hpp,
> function
>
> boost::simple_segregated_storage::malloc_n
>
> should meet a precondition "!empty()". Putting this condition
> in a body
> of function as "assert (!empty()) " at once shows that it is
> not observed. Not
> clear, why boost::pool author has not made it himself. The
> test example built
> with g++ 2.95.3, without this "assert" is silently running,
> as if there is no
> errors. However when I tried STLport 4.1b6 (and any later
> version) then
> immediate segmentation fault was occured.
>
> Is it some kind of my fault, or real bug in boost::pool?

This is a documentation error. That precondition is not actually required
for that function. Thanks for finding it -- I'll fix it.

The segementation fault is another problem. I know that STLport, at least
as of ver 4.0, has a bug in its usage of allocators, so if you look in the
beginning of 'pool_alloc.hpp', you'll see I define:
 #define BOOST_POOL_ALLOC_ALLOW_NULL_DEALLOCATE
for __SGI_STL_PORT <= 0x400. I suspect that if you define this, it will
work.

        -Steve


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk