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?