Bug 74696
Summary: | sizeof(InlineBox) is 36 instead of 32 on Windows | ||
---|---|---|---|
Product: | WebKit | Reporter: | Ryosuke Niwa <rniwa> |
Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | aroben, darin, kling, koivisto, tony |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Ryosuke Niwa
Same problem as RenderObject. This one isn't as severe as RenderObject but it's still 12.5% increase in the size :(
Unlike gcc and clang, MSVC pads each consecutive member variables of the same type
in bitfields. e.g. if you have:
sturct AB {
unsigned m_1 : 31;
bool m_2 : 1;
}
then MSVC pads m_1 and allocates sizeof(unsigned) * 2 for AB whereas gcc and clang
only allocate sizeof(unsigned) * 1 for AB.
As a result, RenderObject consumes 44 bytes instead of 32 bytes when compiled on Windows by cl.exe.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |