[webkit-reviews] review granted: [Bug 202105] Reduce the amount of memory needed to store Options. : [Attachment 383713] proposed patch.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Nov 18 11:18:10 PST 2019

Robin Morisset <rmorisset at apple.com> has granted Mark Lam
<mark.lam at apple.com>'s request for review:
Bug 202105: Reduce the amount of memory needed to store Options.

Attachment 383713: proposed patch.


--- Comment #31 from Robin Morisset <rmorisset at apple.com> ---
Comment on attachment 383713
  --> https://bugs.webkit.org/attachment.cgi?id=383713
proposed patch.

View in context: https://bugs.webkit.org/attachment.cgi?id=383713&action=review

r=me, I love a patch that makes things easier to read and more efficient at the
same time.

> Source/JavaScriptCore/runtime/JSCConfig.h:42
> +constexpr size_t ConfigSizeToProtect = PageSize;

Is it possible to have some static_assert that the size of the options fit in
that ?
I've seen one that checks for 16*KB, are we guaranteed that PageSize is always
that on every platform?

> Source/JavaScriptCore/runtime/Options.cpp:917
>	   return; // Illegal option.

If it is illegal, can we make it a release assert instead?

> Source/JavaScriptCore/runtime/Options.cpp:1038
>  {

nitpicking, but I think an ASSERT(type() == other.type()) might be valuable

> Source/JavaScriptCore/runtime/OptionsList.h:74
> +// Any modifications to options must be done before the first VM is

nit: instantiate => instantiated.

> Source/JavaScriptCore/runtime/OptionsList.h:555
> +    { // Only needed for initialization

I don't understand this at all, this function appears to do nothing when passed
a non-zero number. I realize it's not a change from your patch, but can you
explain what this is for?

More information about the webkit-reviews mailing list