Closed Bug 423036 Opened 13 years ago Closed 13 years ago

Decommit for huge_[mp]alloc() and base_alloc(), fix huge_palloc()

Categories

(Core :: XPCOM, enhancement)

x86
Windows Vista
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9beta5

People

(Reporter: jasone, Assigned: jasone)

Details

(Keywords: memory-footprint)

Attachments

(1 file, 1 obsolete file)

The attached patch adds code that decommits unused pages for two types of allocations: base and huge.  Base allocations are for internal use by jemalloc, and in the common case, there are ~1020KiB of mapped base pages that are unused.  Huge allocations appear to be infrequent in Firefox, but they do happen, and since they are rounded up to the nearest multiple of 1MiB, it is common for there to be many trailing unused pages.

This patch also fixes huge_palloc() (handles large alignment cases for posix_memalign()) to work on Windows.  I have been unable to come up with a usage scenario that even causes that function to be called.  posix_memalign() was only recently added, so there are very few callers right now, but it should be fixed at some point.
Attachment #309546 - Flags: review?(pavlov)
Component: OS Integration → XPCOM
Product: Firefox → Core
QA Contact: os.integration → xpcom
Target Milestone: Firefox 3 beta5 → mozilla1.9beta5
Version: unspecified → Trunk
This patch revision adds a missing '}'.
Attachment #309546 - Attachment is obsolete: true
Attachment #309585 - Flags: review?(pavlov)
Attachment #309546 - Flags: review?(pavlov)
Comment on attachment 309585 [details] [diff] [review]
huge_[mp]alloc()/base_alloc() decommit, huge_palloc() fix

this will save us potentially a lot of memory in certain cases.  we should get this in
Attachment #309585 - Flags: superreview+
Attachment #309585 - Flags: review?(pavlov)
Attachment #309585 - Flags: review+
Attachment #309585 - Flags: approval1.9?
Comment on attachment 309585 [details] [diff] [review]
huge_[mp]alloc()/base_alloc() decommit, huge_palloc() fix

a=me for 1.9
Attachment #309585 - Flags: approval1.9? → approval1.9+
checked in
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Keywords: footprint
You need to log in before you can comment on or make changes to this bug.