[webkit-dev] strdup in WebKit
kwangyul.seo at gmail.com
Wed Jan 20 02:07:26 PST 2010
WebKit does not use malloc/free directly in favor of fastMalloc/fastFree.
The only exception to this rule is strdup() which returns a memory that must
be freed by free. Why don't we add fastStrDup which allocates a memory with
fastMalloc? The memory returned by fastStrDup can be freed by fastFree.
The following source files in WebCore contains strdup calls.
strdup/free pairs can be safely replaced with fastStrDup/fastFree in most
cases. However, bridge and bindings can be an exception because some APIs
must return malloc() allocated memory that can be freed with free().
I am asking this because strdup (POSIX function) is not available in RVCT.
If this is not possible for some reasons, adding strdup to StringExtras.h
for RVCT can be a good solution too. How does the Symbian QT port solve this
Kwang Yul Seo
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-dev