> On Dec 16, 2012, at 8:43 PM, Markos Zaharioudakis <markos...@yahoo.com> wrote:
> > The memory size of some std containers is underestimated, because the book-
> keeping overhead is not taken into account. I understand we cannot be 100%
> exact here, but should we try to consider some common std implementations and
> measure the mem size accordingly? For example, std::map is typically
> implemented as a red-black tree, which should add at least 2 pointers (or
> offsets) per entry into its memory size.
> OK, I added sizeof(void*) * 2.

I guess the unordered_map (and set) should have 1 extra pointer per entry and 1 
extra pointer per hash bucket?

Your team Zorba Coders is subscribed to branch lp:zorba.

Mailing list: https://launchpad.net/~zorba-coders
Post to     : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp

Reply via email to