On Thu, Nov 6, 2008 at 4:27 PM, Adam Merz
Michael Fawcett
writes: I investigated the node structure that my std::map implementation is using. It has an overhead of 3 pointers and 2 chars. This is with Visual Studio 2005 SP1.
Are you building in release with _SECURE_SCL #defined to 0? If not, you have extra size overhead from debug and/or checked iterators being enabled.
I'm building in Debug mode with _SECURE_SCL = 0 and _HAS_ITERATOR_DEBUGGING = 0. I'm in Debug mode so that the _Crt* debug functions aren't compiled away since I was using those to track memory usage. Do you know of a better way to track memory usage in Windows? Task Manager is obviously not up to the task, VTune reports it on a system-wide basis, not per process, and _Crt* functions require modifying your code. --Michael Fawcett