Thanks for all your replies Chris, Jon and Ian!

I will implement a custom allocator and pass it to the unordered_map. But for starters it looks like the Valgrind solution seems easiest. I am working on Windows using Visual C++, compiler VC12. I will look for Valgrind alternatives for Windows.

Thanks,
-R


On Nov 8, 2016 3:13 AM, "Ian Bruntlett" <ian.bruntlett@gmail.com> wrote:
Hi Ram,

On 7 November 2016 at 05:30, Ram <sourceopen@gmail.com> wrote:
Hi,

I would like to calculate the size of my filled up boost::unordered_map including the house keeping. I was thinking of sizeof(boost:unordered_map mymap). I asked this question on stackoverflow but they say that wont help. Can  somebody tell me an easy way to find the size including the housekeeping that it takes?

The boost::unordered_map stores a std::string as the key and a pointer to my class object as the value.

Not sure which platform you are doing this on but if you are using some kind of Linux then this site http://valgrind.org/ might be useful

BW,


Ian

--
-- ACCU - Professionalism in programming - http://www.accu.org
-- My writing - https://sites.google.com/site/ianbruntlett/


_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users