Closed Bug 1016153 Opened 11 years ago Closed 11 years ago

Avoid slop in xmlparse.c:poolGrow()

Categories

(Core :: XML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla32

People

(Reporter: n.nethercote, Assigned: n.nethercote)

Details

(Whiteboard: [MemShrink:P2][clownshoes])

Attachments

(1 file)

xmlparse.c:poolGrow() does a classic clownshoes allocation -- it requests space for 1024 chars (which are 2 bytes each) plus a few extra bytes for a header. This amounts to slightly more than 2048 bytes, which jemalloc rounds up to 4096 bytes. Just after starting Firefox, this slop takes up about 250 KiB. It appears to disappear fairly quickly; I guess the XML parsing finishes and the memory is freed. Still, definitely worth fixing.
The change is simple.
Attachment #8428970 - Flags: review?(jst)
Whiteboard: [MemShrink][clownshoes]
Component: HTML: Parser → XML
Whiteboard: [MemShrink][clownshoes] → [MemShrink:P2][clownshoes]
I'll check if this shows up in DMD reports on B2G.
Flags: needinfo?(erahm)
bkelly checked and didn't find poolGrow in DMD reports from tarako.
Flags: needinfo?(erahm)
Attachment #8428970 - Flags: review?(jst) → review+
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: