Closed Bug 835966 Opened 7 years ago Closed 7 years ago

Refactor {cx,rt,allocator}->malloc_

Categories

(Core :: JavaScript Engine, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla21

People

(Reporter: billm, Assigned: billm)

Details

Attachments

(1 file)

Attached patch patchSplinter Review
We have a couple copies of all the malloc-related functions now, and they all do basically the same thing. The only differences are how they update the malloc counter and how they handle OOM. So I added a new MallocProvider class that JSRuntime, JSContext, and Allocator can implement. They're allowed to specialize how they handle the malloc counter and OOM.
Attachment #707764 - Flags: review?(luke)
Attachment #707764 - Flags: review?(luke) → review+
https://hg.mozilla.org/mozilla-central/rev/da9f300569ab
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in before you can comment on or make changes to this bug.