[webkit-dev] global new/delete operator in WebKit

2010-01-13 Thread Darin Adler
In the discussion in bug 32831, Yong Li asked me why we are planning, in the future, to remove the global new/delete operator in the Mac OS X WebKit. I decided it was worth answering here. Why does WebKit override operator new/delete? Historically on Mac OS X we got faster performance by using

Re: [webkit-dev] global new/delete operator in WebKit

2010-01-13 Thread Yong Li
Darin, thank you very much for writing this for my questions. I have another question for "new int[10]", but I guess the answer will be "using Vector instead". I like the idea that webkit should allow using a custom memory allocator, but I think for most platforms/compilers, overloading global new

Re: [webkit-dev] global new/delete operator in WebKit

2010-01-13 Thread Zoltan Horvath
First, Darin thanks for the summary! On Wednesday 13 January 2010, at 20:23, Yong Li wrote: > Darin, thank you very much for writing this for my questions. I have > another question for "new int[10]", but I guess the answer will be "using > Vector instead". At the most of the cases WebKit doesn'

Re: [webkit-dev] global new/delete operator in WebKit

2010-01-13 Thread Yong Li
2010/1/13 Zoltan Horvath > > First, Darin thanks for the summary! > > On Wednesday 13 January 2010, at 20:23, Yong Li wrote: > > Darin, thank you very much for writing this for my questions. I have > > another question for "new int[10]", but I guess the answer will be "using > > Vector instead".

Re: [webkit-dev] global new/delete operator in WebKit

2010-01-14 Thread Darin Adler
On Jan 13, 2010, at 6:25 PM, Yong Li wrote: > Sorry for my English. "does" should be "will". I think your question is unclear. The WebKit project will not “ban” use of a global new/delete operator. -- Darin ___ webkit-dev mailing list webkit-dev@

Re: [webkit-dev] global new/delete operator in WebKit

2010-02-18 Thread İsmail Dönmez
Hi; Picking up and old thread I know... On Wed, Jan 13, 2010 at 7:19 PM, Darin Adler wrote: > Yong Li also asked about standard library functions calling new and delete, > specifically STL. I believe we have been avoiding calling these functions in > WebKit, but I may be mistaken. > Recently I

Re: [webkit-dev] global new/delete operator in WebKit

2010-02-18 Thread Stephan Assmus
Hi, On 2010-02-18 at 15:59:35 [+0100], İsmail Dönmez wrote: > Picking up and old thread I know... > > On Wed, Jan 13, 2010 at 7:19 PM, Darin Adler wrote: > > > Yong Li also asked about standard library functions calling new and > > delete, > > specifically STL. I believe we have been avoiding

Re: [webkit-dev] global new/delete operator in WebKit

2010-02-18 Thread İsmail Dönmez
Hi Stephan; On Thu, Feb 18, 2010 at 5:30 PM, Stephan Assmus wrote: > Hi, > > On 2010-02-18 at 15:59:35 [+0100], İsmail Dönmez > wrote: > > Picking up and old thread I know... > > > > On Wed, Jan 13, 2010 at 7:19 PM, Darin Adler wrote: > > > > > Yong Li also asked about standard library functio

Re: [webkit-dev] global new/delete operator in WebKit

2010-02-18 Thread Alexey Proskuryakov
On 18.02.2010, at 6:59, İsmail Dönmez wrote: Recently I came across some memory corruption issues and turns out that WebKit uses std::stable_sort which uses the operator new(nothrow) . I am not sure if there is a useful replacement but its good to know about this. We definitely need a re