Closed Bug 787512 Opened 12 years ago Closed 12 years ago

Pack bits in nsListenerStruct better on Windows

Categories

(Core :: DOM: Events, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla18

People

(Reporter: khuey, Assigned: khuey)

References

Details

Attachments

(1 file)

The boolean we added in Bug 687332 pushes the struct size from 16 to 17 bytes, which jemalloc rounds up to 32.  There's no reason the booleans can't fit inside 16 bytes, so we're using double the memory we should for this struct.
Comment on attachment 657383 [details] [diff] [review]
Patch

Review of attachment 657383 [details] [diff] [review]:
-----------------------------------------------------------------

::: content/events/src/nsEventListenerManager.h
@@ +40,5 @@
>  struct nsListenerStruct
>  {
>    nsRefPtr<nsIDOMEventListener> mListener;
>    uint32_t                      mEventType;
>    nsCOMPtr<nsIAtom>             mTypeAtom;

Would swapping around those two save some on 64-bit too?
Probably, but that's not what this bug is about.
Comment on attachment 657383 [details] [diff] [review]
Patch

r=me if you made sure this actually makes Windows to pack this stuff in
a sane way.
Attachment #657383 - Flags: review?(bugs) → review+
Yes, I did.  I do meet basic standards of competency. :-P
https://hg.mozilla.org/mozilla-central/rev/059f341beaad
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: