[webkit-dev] How to OverLoad the new operator in webkit ?

praveen munukutla munukutlapraveen at gmail.com
Fri Dec 9 03:18:15 PST 2011


Hi all,

How to OverLoad the new operator in webkit ?

i have written an overloaded new operator void* operator new(size_t,int) in
the FastAllocBase.h

Fastallocbase is being inherited by Noncopyable  and the Noncopyable is
being inherited by class Page : public Noncopyable .

now im calling  int* p = new(1)int; in Page constructor. Page.cpp and
FastAllocBase.h are complied but there is a problem in linking.I am getting
a "undefined reference to operator new(unsigned int,int)" while linking
time.

Can anyone throw some light on this ?


Thanks in advance.
~Praveen Munukutla.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20111209/81f96b98/attachment.html>


More information about the webkit-dev mailing list