[Webkit-unassigned] [Bug 88344] Fix FastMalloc.cpp compile error for MSVC in 64-bit

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jun 14 10:40:37 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=88344





--- Comment #22 from Ryosuke Niwa <rniwa at webkit.org>  2012-06-14 10:40:36 PST ---
(From update of attachment 147611)
View in context: https://bugs.webkit.org/attachment.cgi?id=147611&action=review

> Source/WTF/wtf/FastMalloc.cpp:2484
> +#if COMPILER(MSVC)
> +template <int SizeToPad> class TCMalloc_Central_FreeListPadded : public TCMalloc_Central_FreeList {
> + private:
> +    char pad[64 - SizeToPad];
> +};
> +template <> class TCMalloc_Central_FreeListPadded<0> : public TCMalloc_Central_FreeList { };
> +#else
>  class TCMalloc_Central_FreeListPadded : public TCMalloc_Central_FreeList {
>   private:
>    char pad_[(64 - (sizeof(TCMalloc_Central_FreeList) % 64)) % 64];
>  };
> +#endif

Why do we not want to use this template for other compilers? I don't see any benefit in that.
All I've asked you to do is to do
typedef TCMalloc_Central_FreeListPadded<sizeof(TCMalloc_Central_FreeList) % 64> TCMalloc_Central_FreeListPadded;

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list