Bug 96924
| Summary: | Get rid of the inline reserveAndCommit() implementation | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Yong Li <yong.li.webkit> |
| Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED INVALID | ||
| Severity: | Normal | CC: | barraclough, ggaren, mrowe, msaboff |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Yong Li
Both OSAllocatorPosix.cpp and OSAllocatorWin.cpp provide the implementation of reserveAndCommit(), but we also have an inline version in OSAllocator.h:
inline void* OSAllocator::reserveAndCommit(size_t reserveSize, size_t commitSize, Usage usage, bool writable, bool executable)
{
void* base = reserveUncommitted(reserveSize, usage, writable, executable);
commit(base, commitSize, writable, executable);
return base;
}
I don't know why this even compile...
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Gavin Barraclough
OSAllocator declares two methods called reserveAndCommit with difference signatures, one is implemented in OSAllocator.h, one is implemented in the platform specific .cpp.
That said, I'm not sure if we call this one any more. We may be abel to remove it, if we do we should remove the corresponding declaration at the same time.
Yong Li
Ha... Somehow I saw only one signature. A quick search shows that the inline version isn't being used. If it was, it wouldn't be good, as I don't think it is an efficient solution for OSAllocatorPosix. I'm going to get rid of it.
Yong Li
actually it is invalid. sorry