Closed Bug 446096 Opened 13 years ago Closed 13 years ago

Integrate upstream jemalloc optimizations

Categories

(Core :: Memory Allocator, enhancement)

x86
Linux
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jasone, Assigned: jasone)

References

Details

(Keywords: memory-footprint, perf)

Attachments

(1 file)

The upstream (FreeBSD) jemalloc contains substantial speed and space optimizations that we should integrate.
Depends on: 446090
Enhance arena_chunk_map_t to directly support run coalescing, and use
the chunk map instead of red-black trees where possible.  Remove the
red-black trees and node objects that are obsoleted by this change.  The
net result is a ~1-2% memory savings, and a substantial allocation speed
improvement.
Attachment #330313 - Flags: review?(pavlov)
Blocks: 414946
I forgot to note that the patch also introduces a radix tree that is used to substantially simplify and speed up isalloc_validate().  This makes checking whether object pointers reside within memory managed by jemalloc much faster.

isalloc_validate() is heavily used by the OS X port (see bug #414946).  The radix tree may end up being critical on Windows as well if 
[continuation of comment #2]

[... critical on Windows if] we add a Mozilla-specific allocation API separate from the standard malloc() (moz_malloc(), moz_free(), etc.) in order to allow mixed allocator use for cases where a custom CRT cannot be used.
Attachment #330313 - Flags: review?(pavlov) → review+
changeset:   16218:d6bbea319540
user:        Jason Evans <jasone@canonware.com>
date:        Fri Jul 25 14:53:20 2008 -0700
summary:     Bug 446096: Integrate upstream jemalloc optimizations, r=pavlov
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Keywords: footprint, perf
Depends on: 686932
You need to log in before you can comment on or make changes to this bug.