How much memory consumed by my object
<p>I want to know programmatic way to get the memory consumed by my user defined class.
Following is the declaration of the class</p>

<pre><code>struct TrieNode {
    typedef std::map&lt;char, TrieNode *&gt; ChildType;
    std::string    m_word;
    bool      m_visited;
}
</code></pre>

<p>I have inserted around <code>264061</code> words into this <code>Trie</code>. After this when i do <code>sizeof(trieobject)</code> it just show me <code>32</code>. How do i know how much exact memory is used by such data structures.</p>
