|
Boost : |
From: Daniel Frey (daniel.frey_at_[hidden])
Date: 2003-07-21 08:13:11
Jan Gaspar wrote:
>
> 1) This is is not true. The members of the iterator are:
> const Buff* m_buff;
> pointer m_it;
> bool m_end;
>
> At Windows based systems sizeof(m_buff) == 4, sizeof(m_it) == 4 and sizeof(m_end)
> == 1. It is not 30%.
You can't just sum up the size of the members, you have to take padding
into account. The struct's size will most probably be 12 bytes, not 9.
> 2) Suppose you are storing elements of size 1000 bytes. By allocating one more
> extra element ...
That, however, is a very convincing argument :)
Regards, Daniel
-- Daniel Frey aixigo AG - financial training, research and technology Schloß-Rahe-Straße 15, 52072 Aachen, Germany fon: +49 (0)241 936737-42, fax: +49 (0)241 936737-99 eMail: daniel.frey_at_[hidden], web: http://www.aixigo.de
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk