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

RESOLVED FIXED in mozilla1.9beta5

Status

()

--
enhancement
RESOLVED FIXED
11 years ago
11 years ago

People

(Reporter: jasone, Assigned: jasone)

Tracking

({memory-footprint})

Trunk
mozilla1.9beta5
x86
Windows Vista
memory-footprint
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

11 years ago
Created attachment 309546 [details] [diff] [review]
huge_[mp]alloc()/base_alloc() decommit, huge_palloc() fix

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
(Assignee)

Comment 1

11 years ago
Created attachment 309585 [details] [diff] [review]
huge_[mp]alloc()/base_alloc() decommit, huge_palloc() fix

This patch revision adds a missing '}'.
Attachment #309546 - Attachment is obsolete: true
Attachment #309585 - Flags: review?(pavlov)
Attachment #309546 - Flags: review?(pavlov)

Comment 2

11 years ago
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+

Comment 4

11 years ago
checked in
Status: ASSIGNED → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED

Updated

11 years ago
Keywords: footprint
You need to log in before you can comment on or make changes to this bug.