Closed Bug 452489 Opened 11 years ago Closed 10 years ago

clean up nsMemoryImpl for OOM issues.

Categories

(Core :: XPCOM, defect)

x86
Linux
defect
Not set

Tracking

()

RESOLVED INVALID

People

(Reporter: dougt, Unassigned)

References

(Depends on 1 open bug)

Details

Attachments

(1 file, 3 obsolete files)

Attached patch patch v.1 w/ API change (obsolete) — Splinter Review
Changes:

1) adjusts the behavior of the heapMinimize method to make the "immediate" parameter unused.  If heapMinimized is called on the main thread, it will happen synchronously, if it is called on any other thread, it will be called asynchronously.  This is an optional change, but it does make the API easier to understand.

2) I am enabling the memoryflusher thread.  Since we were not holding a reference to the timer, it would never fire (the timer's destructor kills the timer).  I also removed a bunch of member variables are are just not used.

3) I reduced the timer callback from a huge number to once every 1/2 second.  I can't imagine this timer being useful if not called often.

4) On the OSSO platform, we do not use their API but instead look at the sys vm files instead.  This was a suggestion made by one of the maemo developers and allows us to use a higher water mark (we get notified sooner of OOM).


I think we might also want to disable this flusher on windows.  It isn't being used and i do not think it will make any difference.
Attachment #335762 - Flags: review?(benjamin)
Attached patch same patch without api changes (obsolete) — Splinter Review
lets do it this way first...  no api changes.
Attachment #335762 - Attachment is obsolete: true
Attachment #335779 - Flags: review?(benjamin)
Attachment #335762 - Flags: review?(benjamin)
Blocks: 445923
Attachment #335779 - Attachment is obsolete: true
Attachment #336093 - Flags: review?(benjamin)
Attachment #335779 - Flags: review?(benjamin)
Attachment #336093 - Flags: review?(benjamin) → review+
changeset:   18562:6b6054736cb2
tag:         tip
user:        Doug Turner <dougt@meer.net>
date:        Mon Sep 01 17:40:15 2008 -0700
summary:     bug 452489 - removes the flusher timer and fixes osso low memory predicate.  also fixes OSSO oom predicate. r=bsmedberg
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
backed out.  this light up the windows unit test:

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1220316401.1220322388.28758.gz&fulltext=1

Something that wasn't tested on the try servers. :-(
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
the box is still red after the backout.  this can land again when the tree clears.
dougt@mozilla.com
Wed Sep 03 16:06:30 2008 -0700	04a28fb0458b	Doug Turner — Bug 452489 - clean up nsMemoryImpl for OOM issues. r=bsmedberg
Status: REOPENED → RESOLVED
Closed: 11 years ago11 years ago
Resolution: --- → FIXED
same problem as comment #4.  backed out.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
I pushed only the OSSO part:
1799243b9089	Doug Turner — Bug 452489 - Fixes OOM predicate on OSSO to use the high water mark. r=bsmedberg default tip 

The rest of this is going to be blocked by the TestTimer.exe crash on win32 (bug 453822)
Depends on: 453822
not going to look at this for a bit;  feel free to reassign.
Assignee: doug.turner → nobody
This is now invalid.  Bug 475595 addresses all of the concerns here and has landed.
Status: REOPENED → RESOLVED
Closed: 11 years ago10 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.