Bug 99655
| Summary: | V8::AdjustAmountOfExternalAllocatedMemory calls in WebCoreStringResource are inaccurate | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Eric Seidel (no email) <eric> |
| Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED INVALID | ||
| Severity: | Normal | CC: | abarth, burg, haraken |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Eric Seidel (no email)
V8::AdjustAmountOfExternalAllocatedMemory calls in WebCoreStringResource are inaccurate
The v8 API (according to api.cpp):
intptr_t V8::AdjustAmountOfExternalAllocatedMemory(intptr_t change_in_bytes) {
We're calling this function, assuming that AtomicString/String are take up 2 bytes per character:
v8::V8::AdjustAmountOfExternalAllocatedMemory(2 * m_atomicString.length());
Which is wrong... In many ways. Especially in the context of 8-bit strings, or even just the fact that strings are shared?
But I'm not sure how much the accuracy of this reporting matters (if at all).
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Eric Seidel (no email)
Or the fact that if m_plainString is already isAtomic() than m_atomicString is never causing any allocation. :)