[webkit-dev] Fix for Vector::m_inlineBuffer alignment?

Paul Pedriana ppedriana at gmail.com
Thu Sep 4 01:20:39 PDT 2008


Well the proposed solution in 
<https://bugs.webkit.org/show_bug.cgi?id=16925> doesn't work, as VC++ 
doesn't accept that syntax. And the solutions in 
<https://bugs.webkit.org/show_bug.cgi?id=19775> whereby a uint32_t or 
uint64_t buffer are made don't work for larger types and use more memory 
than necessary. They might be useful as a fallback for compilers that 
don't support alignment directives, though the primary implementations 
of every compiler that I work with (GCC, VC++, CodeWarrior, EDG, SN, 
IBM) support it.

I'll make a patch and attach it to 
<https://bugs.webkit.org/show_bug.cgi?id=16925>, if that's OK.

Paul



>
> On Sep 4, 2008, at 2:05 AM, Paul Pedriana wrote:
>
>> I see that JavaScriptCore/wtf/Vector.h has this:
>>
>>    // FIXME: Nothing guarantees this buffer is appropriately aligned to
>> hold objects of type T.
>>    char m_inlineBuffer[m_inlineBufferSize];
>
>
> We have a bug for this: 
> <https://bugs.webkit.org/show_bug.cgi?id=16925>. Also, 
> <https://bugs.webkit.org/show_bug.cgi?id=19775>.
>
> There are several patches and suggestions in these bugs, which wait 
> for someone to submit them as clean patches.
>
> - WBR, Alexey Proskuryakov
>
>
>



More information about the webkit-dev mailing list