How can i estimate memory usage of stl::map?
Posted
by Drakosha
on Stack Overflow
See other posts from Stack Overflow
or by Drakosha
Published on 2009-04-06T07:39:01Z
Indexed on
2010/04/18
19:53 UTC
Read the original article
Hit count: 408
For example, I have a std::map with known sizeof(A) and sizefo(B), while map has N entries inside. How would you estimate its memory usage? I'd say it's something like
(sizeof(A) + sizeof(B)) * N * factor
But what is the factor? Different formula maybe?
Update: Maybe it's easier to ask for upper bound?
© Stack Overflow or respective owner