Closed Bug 667474 Opened 14 years ago Closed 14 years ago

Do a basic computation of windows' size in the DOM Memory Reporter

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla7

People

(Reporter: mounir, Assigned: mounir)

References

Details

Attachments

(1 file)

Basically, the idea of this patch is to add the code that goes trough all windows (even leaked ones) and add sizeof(*this) to the dom memory reporter section. Documents/elements will be added in another bug same as improving window's memory usage computation.
Attached patch Patch v1Splinter Review
Attachment #542173 - Flags: review?(jst)
Blocks: 667485
Comment on attachment 542173 [details] [diff] [review] Patch v1 + PRInt64 SizeOf() const { + return sizeof(*this); Is there precedence in other similar code to use PRInt64 for the return type of SizeOf()? If not, I think we should use size_t here, or PRUint64 if size_t is no good. r=jst with that.
Attachment #542173 - Flags: review?(jst) → review+
PRInt64 is the return type for GetMemoryUsed() in nsIMemoryReporter classes, which is probably why Mounir is using it.
Exactly. I believe I should keep PRInt64 given that the only caller needs PRInt64 and not size_t. Though, Nicholas, why nsIMemoryReporter uses PRInt64 instead of size_t?
(In reply to comment #4) > Though, Nicholas, why nsIMemoryReporter uses PRInt64 instead of size_t? I don't know, it was like that when I inherited the code.
Flags: in-testsuite-
Whiteboard: [needs review] → [inbound]
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [inbound]
Target Milestone: --- → mozilla7
(In reply to comment #5) > (In reply to comment #4) > > Though, Nicholas, why nsIMemoryReporter uses PRInt64 instead of size_t? > > I don't know, it was like that when I inherited the code. It was like that because it was designed to be called from script in the first about:memory impl vlad did.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: