Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-05-11 07:02:12


From: "Gennadiy Rozental" <rogeeff_at_[hidden]>
> 4. In majority of the cases memory overhead is only 4 bytes (in worst case
> 8), while current implementation has at least 9 (if I am reading correctly
> the code).

Gennadiy, thanks for the bug report. The overhead should be 12 and not 9.
You are right that an implementation that doesn't attempt to address the two
heap EXE/DLL issue can have an overhead of 4 best / 4 + sizeof(D) worst.

Your other observation, that the default constructor is overspecified, is
correct, too. The current spec forces an allocation, which means that it may
throw bad_alloc; this is undesirable, it should offer the nothrow guarantee.


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