By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,983 Members | 2,082 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,983 IT Pros & Developers. It's quick & easy.

How are STL Map stored in memory?

P: 12
How are STL Map stored in memory?
i.e. they are stored in continuous memory like array or stored in a list or like a deque i.e in pages or in binary tree?
Oct 5 '10 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 5K+
P: 9,197
None of your concern.

I idea behind encapsulation is that you cannot see the implementation. Because of that you can't make assumptions about the implementation and then put those assumptions into your code.

The templates are in the <map> include file and you can examine them there.

There is no requirement by the C++ standard that a <map> has to have a specific memory management plan. Therefore, each author of STL templates can have different implementations. That is why I suggest you look at your own templates.
Oct 5 '10 #2

Post your reply

Sign in to post your reply or Sign up for a free account.