|
Boost Users : |
Subject: Re: [Boost-users] Help in calculating the size of a boost::unordered_map
From: Jon Kalb (jonkalb_at_[hidden])
Date: 2016-11-07 13:58:15
Ram,
boost::unordered_map takes an allocator parameter. I think the only way to get the answer to this question is to an instrumented allocator to the container that you can query to determine how much memory was requested.
Jon
From: Boost-users <boost-users-bounces_at_[hidden]> on behalf of Ram <sourceopen_at_[hidden]>
Reply-To: Boost Users <boost-users_at_[hidden]>
Date: Monday, November 7, 2016 at 3:58 AM
To: Boost Users <boost-users_at_[hidden]>
Subject: Re: [Boost-users] Help in calculating the size of a boost::unordered_map
Hi,
Can anybody please help with this?
Thanks,
-R
On Mon, Nov 7, 2016 at 11:00 AM, Ram <sourceopen_at_[hidden]> 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.
Thanks,
Ram
_______________________________________________ Boost-users mailing list Boost-users_at_[hidden] http://lists.boost.org/mailman/listinfo.cgi/boost-users
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net