[webkit-reviews] review requested: [Bug 29500] Reduce memory usage of WebCore::StringImpl : [Attachment 40744] patch #5 (remove flag accessors)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 6 14:24:25 PDT 2009


Jens Alfke <snej at chromium.org> has asked  for review:
Bug 29500: Reduce memory usage of WebCore::StringImpl
https://bugs.webkit.org/show_bug.cgi?id=29500

Attachment 40744: patch #5 (remove flag accessors)
https://bugs.webkit.org/attachment.cgi?id=40744&action=review

------- Additional Comments from Jens Alfke <snej at chromium.org>
OK, I've removed the abstracted flag getter/setters.

I looked into the empty-array thing -- it looks like specifying an array
without size ("UChar m_buffer[];") is better. It's an official part of C99 and
appear to have de facto support in real-world C++ compilers, including GCC and
MSVC++.
If there's a compiler that doesn't support it, it would be easy to add an
#ifdef for that compiler and substitute an array size of 1. That will just end
up wasting two bytes (plus any rounding) in the case of StringImpls with
separate buffers.


More information about the webkit-reviews mailing list