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)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla7
People
(Reporter: mounir, Assigned: mounir)
References
Details
Attachments
(1 file)
|
3.22 KB,
patch
|
jst
:
review+
|
Details | Diff | Splinter Review |
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.
| Assignee | ||
Comment 1•14 years ago
|
||
Attachment #542173 -
Flags: review?(jst)
Comment 2•14 years ago
|
||
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+
Comment 3•14 years ago
|
||
PRInt64 is the return type for GetMemoryUsed() in nsIMemoryReporter classes, which is probably why Mounir is using it.
| Assignee | ||
Comment 4•14 years ago
|
||
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?
Comment 5•14 years ago
|
||
(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.
| Assignee | ||
Updated•14 years ago
|
Flags: in-testsuite-
Whiteboard: [needs review] → [inbound]
| Assignee | ||
Comment 6•14 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [inbound]
Target Milestone: --- → mozilla7
Comment 7•14 years ago
|
||
(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.
Description
•