Mozilla doesn't release memory used for multiple windows

RESOLVED FIXED in mozilla1.0

Status

SeaMonkey
General
P2
normal
RESOLVED FIXED
16 years ago
13 years ago

People

(Reporter: Dom Incollingo, Assigned: Suresh Duddi (gone))

Tracking

({memory-footprint})

Trunk
mozilla1.0
x86
Windows 2000
memory-footprint

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

16 years ago
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.8+)
Gecko/20020201
BuildID:    2002020103

Each time a new Navigator Window is opened by choosing File -- New Navigator
Window, Mozilla memory usage increases.  However, the additional memory is not
released when the subsquent Navigator Windows are closed.

Reproducible: Sometimes
Steps to Reproduce:
1.Launch Windows Task Manager to monitor memory usage.
2.Launch Mozilla and navigate to http://www.yahoo.com/  (This is my home page).  
3.Windows Task Manager shows Mozilla memory utilization at 18 MB.
4.Launch 4 additional Navigator Windows by choosing File -- New Navigator
Window.  The four additional Navigator Windows should navigate to
http://www.yahoo.com/
5.Windows Task Manager shows Mozilla memory utilization at 25 MB.
6.Close 4 of the Navigator Windows.  Only the first Navigator Windows remains opens.
7.Windows Task Manager shows Mozilla memory utilization at 24 MB.  It remains at
24 MB for several minutes (perhaps indefinitely).

Actual Results:  Of the 7 additional MB that are allocated when 4 additional
Navigator Windows are opened, only one MB of memory is released when the 4
additional Navigator Windows are closed.

Expected Results:  Mozilla memory usage should go back down to 18 MB when the 4
additional Navigator Windows are closed.

Running build 2002020103 on Win 2K with 512 MB of RAM.  Memory cache is set to
1024 K.  I did not clear cache prior to running this test.
(Reporter)

Comment 1

16 years ago
I've noticed the same behavior for Mozilla Mail.  Steps to reproduce:

1.Launch Mozilla and render http://www.yahoo.com/ (my home page)
2.Memory usage (mozilla.exe in Mem Usage column of task manager) is 18 MB.
3.Launch mozilla mail: Tasks -- Mail & Newsgroups
4.Memory usage (mozilla.exe) is 23 MB.
5.Close mozilla mail, leaving only the browser (www.yahoo.com) open.
6.Memory usage (mozilla.exe) is 22.5 MB.

Memory usage should go back down to 18 MB when Mail & Newsgroups window is closed.
Summary: Mozilla doesn't release memory used for multiple navigator windows → Mozilla doesn't release memory used for multiple windows
(Assignee)

Comment 2

16 years ago
It aint that simple. Even if the code deallocated all the memory, it is highly
unlikely that we would see the number reported in windows task manager go down
because

a) the allocator (malloc) returns memory only if the unused memory is over a
threshhold

b) the free memory available is at the end of the VM space

see http://www.mozilla.org/projects/footprint/footprint-guide.html

That is not to say mail and navigator do release the memory. It is most likely
that most of the memory is not released. We are trying to see if that is a bad
thing and how it would become a good thing to release that memory.

Maybe I can take this bug.
Assignee: asa → dp
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Assignee)

Comment 3

16 years ago
per footprint plan, we need to make sure we release memory no longer needed.
This bug should address browser windows.
Status: NEW → ASSIGNED
Priority: -- → P2
Target Milestone: --- → mozilla0.9.9
(Assignee)

Updated

16 years ago
Keywords: footprint, nsbeta1
(Assignee)

Updated

16 years ago
Target Milestone: mozilla0.9.9 → mozilla1.0
(Assignee)

Updated

16 years ago
Keywords: nsbeta1 → nsbeta1+

Comment 4

16 years ago
Created attachment 73331 [details]
footprint graph

Here is a footprint graph which shows: app startup, open window (using ctrl-N)
5 times and closing window (using alt-F4) 5 times, then shut down.

graph indicates that we are releasing un-used memory after each window close.  


graph is generated using spacetrace, based on trace-malloc data, which hooks
into all malloc and free.

Comment 5

16 years ago
marking bug FIXED.
Status: ASSIGNED → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.