← Back to team overview

zorba-coders team mailing list archive

Re: [Merge] lp:~zorba-coders/zorba/feature-mem_size into lp:zorba

 

> On Dec 16, 2012, at 8:43 PM, Markos Zaharioudakis <markos_za@xxxxxxxxx> 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?

-- 
https://code.launchpad.net/~zorba-coders/zorba/feature-mem_size/+merge/114764
Your team Zorba Coders is subscribed to branch lp:zorba.


References