[webkit-dev] WebKit memory management?
George Staikos
staikos at kde.org
Wed Jun 4 12:54:22 PDT 2008
On 4-Jun-08, at 3:49 PM, Maciej Stachowiak wrote:
>
> On Jun 3, 2008, at 10:58 PM, Paul Pedriana wrote:
>> Thanks for the response. I'm sorry, and perhaps I misunderstand,
>> but I believe your statement about inline operator new is
>> incorrect. Unless I misunderstand you, what you say is not
>> supported by any existing compiler nor is it supported by the C++
>> language standard. In summary, the 'inline' keyword does not
>> negate or obviate the One Definition Rule. You can demonstrate the
>> problem with the code below. Feel free to correct any
>> misunderstanding that I may have of your explanation.
>
> This happens to work as intended on Mac OS X because
> WTF_PRIVATE_INLINE expands to:
>
> __private_extern__ inline __attribute__((always_inline))
>
> This prevents an externally visible definition of global operator
> new and delete from being seen.
>
> I agree this is technically wrong and I suspect it may cause
> problems on, for example, Linux platforms. I think the Qt port has
> turned off FastMalloc for this reason.
That's correct. It's definitely a problem there.
--
George Staikos
Torch Mobile Inc.
http://www.torchmobile.com/
More information about the webkit-dev
mailing list