Closed Bug 418510 Opened 17 years ago Closed 17 years ago

MALLOC_BITMAP alternative and MALLOC_SEATBELTS

Categories

(Core :: Memory Allocator, enhancement)

PowerPC
macOS
enhancement
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: jasone, Assigned: jasone)

Details

Attachments

(1 file)

The attached patch implements two features (both disabled by default) for jemalloc. These features were requested by Stuart Parmenter in the context of performance and stability for OS X. MALLOC_BITMAP alternative: By default, jemalloc tracks unused small regions via bitmaps. If MALLOC_BITMAP is undefined, then unused small objects are instead chained together using singly linked lists. The non-bitmap code is much simpler, but my benchmarking efforts indicate that there is little performance difference. Also note that the bitmaps are less vulnerable to corruption by misbehaved code (writing to an object after deallocating it). MALLOC_SEATBELTS: Instead of crashing at the first hint of trouble when querying data structures during free() and malloc_usable_size(), try to detect problems and continue without crashing. Note that the diagnostic output will cause deadlock if malloc_printf() causes allocation (platform-specific).
Attachment #304336 - Flags: review?(pavlov)
Summary: MALLOC_BITMAP alternative, MALLOC_SEATBELTS → MALLOC_BITMAP alternative and MALLOC_SEATBELTS
Assignee: jasone → nobody
Status: ASSIGNED → NEW
Product: Firefox → Core
QA Contact: general → general
Assignee: nobody → jasone
after talking with jason I don't think we want to take the bitmap stuff. It was a good test but didn't seem to make any big difference. We may want to take the seatbelt stuff for people running on the mac though.
Stuart - based on bug 420678 should we take the seatbelt code?
Flags: blocking1.9?
Minusing based on stuart's comments here -- though you guys should probably talk and figure out if that's correct or not?
Flags: blocking1.9? → blocking1.9-
Stuart and I chatted about this, and we came to the conclusion that the seatbelt code doesn't go far enough for the purposes of catching the mixed-allocator bugs like in bug 420678.
Assignee: jasone → nobody
Component: General → jemalloc
QA Contact: general → jemalloc
Assignee: nobody → jasone
These features will not be incorporated, since they do not adequately solve an existing need.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → WONTFIX
Attachment #304336 - Flags: review?(pavlov)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: