Closed Bug 127069 Opened 23 years ago Closed 23 years ago

Default process heap is 1MB

Categories

(SeaMonkey :: General, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.0

People

(Reporter: dp, Assigned: blythe)

Details

(Keywords: memory-footprint)

Attachments

(2 files, 1 obsolete file)

We waste about 800k of this 1MB default process heap. Garrett thinks we can shrink this by using EDITBIN.EXE to resize this. Ideal size would be 256K
Keywords: footprint, nsbeta1
Reclaim .75 MB of unutilized VM.
request for r= sr=
Status: NEW → ASSIGNED
brendan, can you sr=? dp r=?
Comment on attachment 70826 [details] [diff] [review] Patch to control default heap size. r=dp Would be great if you can do the same to winEmbed.
Attachment #70826 - Flags: review+
Do the same magic for winEmbed per DP's request.
Attachment #70826 - Attachment is obsolete: true
As a note to others so I can explain what is going on. Each Win32 process has at least 1 heap associated with it. This is the process heap, returned by GetProcessHeap(). If you were a "win32 SDK only" type programmer, this is likely the heap you would heavily utilize. As it turns out, the heap we use mainly in mozilla is the MSVCRT heap, which is created independently by a HeapCreate() call in their CRT source. We only appear to utilize less than 256k of the GetProcessHeap(), and most the action happens inside the CRT heap. The heaps can be enumerated and walked on Win32 (err... NT), which is how we came about this knowledge (see the heap api for the kernel). We had 9 heaps last time DP took a look.
Comment on attachment 70832 [details] [diff] [review] Patch to control default heap size. brendan said "sr=brendan" Cathleen wants bake time for this. Going to request driver approval.
Attachment #70832 - Flags: superreview+
Attachment #70832 - Flags: review+
Comment on attachment 70832 [details] [diff] [review] Patch to control default heap size. Sweet. a=shaver for 0.9.9.
Attachment #70832 - Flags: approval+
Checking in embedding/tests/winEmbed/makefile.win; /cvsroot/mozilla/embedding/tests/winEmbed/makefile.win,v <-- makefile.win new revision: 1.19; previous revision: 1.18 done Checking in xpfe/bootstrap/makefile.win; /cvsroot/mozilla/xpfe/bootstrap/makefile.win,v <-- makefile.win new revision: 1.59; previous revision: 1.58 done
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Garrett, can you make a version of this patch for the gmake windows build? That build uses Makefile.in's instead of makefile.win's.
Reopening so that we don't forget to fix it in the new build system (for win32) too. Btw, which were the 7 other heaps beside the standard process heap and the C library heap?
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
mfcEmbed should get this too (winEmbed is pretty much bitrotted and not used).
Control heap size for mfcEmbed as well. Address gmake Makefile.in files as well. Request for r= sr= a= in order to call this one done.
As for the 7 other heaps: Uknown origin. Any piece of code we load, possibly even system DLLs, could create their own heap. Those other heaps were all very small, 64k or 32k in VM size. dp has the tools to produce their numbers, this is just off the top of my head.
Status: REOPENED → ASSIGNED
dp, can you r=? shaver, can you sr=?
anyone going to r=/sr= garrett's latest patch?
Comment on attachment 70951 [details] [diff] [review] Another patch to control default heap size. r=dp
Attachment #70951 - Flags: review+
nsbeta1+
Keywords: nsbeta1nsbeta1+
Target Milestone: --- → mozilla1.0
Comment on attachment 70951 [details] [diff] [review] Another patch to control default heap size. sr=scc
Attachment #70951 - Flags: superreview+
Comment on attachment 70951 [details] [diff] [review] Another patch to control default heap size. a=asa (on behalf of drivers) for checkin to the 1.0 trunk
Attachment #70951 - Flags: approval+
checked in.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago23 years ago
Resolution: --- → FIXED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: