Platform/Memory Reporting: Difference between revisions

Jump to navigation Jump to search
No edit summary
Line 110: Line 110:


=== Other Considerations ===
=== Other Considerations ===
A number of the existing basic data structures already have <tt>SizeOf{In,Ex}cludingThis</tt> functions, e.g. <tt>nsTArray</tt> and <tt>nsTHashtable</tt>.  <tt>nsTHashtable</tt>'s functions take an extra argument which is a pointer to a function that measures the memory usage of any structures pointed to by entries in the hash table.


Sometimes you may need variations on the above forms.  For example, if you have a function that just measures one member <tt>Foo</tt> of an object, it might be called <tt>SizeOfFoo</tt>.  Try to make the names descriptive enough that it's clear what's being measured.
Sometimes you may need variations on the above forms.  For example, if you have a function that just measures one member <tt>Foo</tt> of an object, it might be called <tt>SizeOfFoo</tt>.  Try to make the names descriptive enough that it's clear what's being measured.
Confirmed users
1,345

edits

Navigation menu