Bug 20566 - FastMalloc should be called instead of malloc
Summary: FastMalloc should be called instead of malloc
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Minor
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-29 04:30 PDT by Gabriella Toth
Modified: 2008-11-10 02:04 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gabriella Toth 2008-08-29 04:30:09 PDT
We found 18 malloc or free invocations and we think they should be changed to FastMalloc or FastFree (according to bug 19287, comment 3).

These invocations can be found in the following path at revision 35986:

WebCore/bridge/c/c_instance.cpp: line 196
WebCore/editing/TextIterator.cpp: line 1323
WebCore/editing/TextIterator.cpp: line 1340
WebCore/editing/TextIterator.cpp: line 1361
WebCore/editing/TextIterator.cpp: line 1374
WebCore/plugins/PluginStream.cpp: line 86
WebCore/bridge/NP_jsobject.cpp: line 56
WebCore/bridge/NP_jsobject.cpp: line 69
WebCore/bridge/NP_jsobject.cpp: line 394
WebCore/bridge/npruntime.cpp: line 73
WebCore/bridge/npruntime.cpp: line 106
WebCore/bridge/npruntime.cpp: line 115
WebCore/bridge/npruntime.cpp: line 153
WebCore/bridge/npruntime.cpp: line 165
WebCore/bridge/npruntime.cpp: line 182
WebCore/bridge/npruntime.cpp: line 222
WebCore/plugins/npapi.cpp: line 48
WebCore/plugins/npapi.cpp: line 53
Comment 1 Mark Rowe (bdash) 2008-08-29 11:58:31 PDT
If you look at the comments in WebCore/editing/TextIterator.cpp, you'll see that the use of system alloc is intentional.

Many of the calls to malloc and free in the NPAPI-related code have this comment associated with them:
        // FIXME: This should really call NPN_MemAlloc but that's in WebKit

NPN_MemAlloc would need to be made accessible from WebCore on the Mac before these cases can be changed.
Comment 2 Gabriella Toth 2008-11-10 02:04:34 PST
Ok. It can be closed.