[xml] How to find the amount of memory allocated for a node



I need to find out how much memory has been allocated for a node including xmlChar* like content. ÂThe number should not include child element nodes. The target could be an element, attribute, etc. ÂIs there an easy way to do this besides sizeof on all the appropriate properties? ÂIf not, I have questions about this:

If I do sizeof(xmlNode) will that give me an accurate number even if it's actually a xmlAttr or some other type of node?

Which struct elements should I also add in to get a an accurate count of the memory?

Any help would be appreciated.

Thanks
:Marco

--
Marco Rogers
marco rogers gmail com

Life is ten percent what happens to you and ninety percent how you respond to it.
- Lou Holtz


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]