[Webkit-unassigned] [Bug 20422] Patch to allow custom memory allocation control

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 1 09:50:19 PDT 2008


https://bugs.webkit.org/show_bug.cgi?id=20422





------- Comment #21 from darin at apple.com  2008-10-01 09:50 PDT -------
(From update of attachment 23971)
Thanks for tackling this.

I think the main problem with this patch is that it went overboard in making
AllocBase a base class for classes that are never used with new/delete.
Noncopyable and ClassInfo are both examples of that. By only using AllocBase as
a base class for classes where we use new/delete the size of the patch would be
smaller and we wouldn't have to make unwanted changes like the loading slowdown
with static constructors.

Other examples of classes that are not ever allocated at all and so don't need
to inherit from AllocBase are the various hash functions. These are simply
traits and don't ever get allocated at all, so there's no reason to change
them. Same thing for many other classes, such as
AVLTreeAbstractorForArrayCompare. Same thing for classes where we only use them
on the stack and never use new.

It makes no sense to add lots of empty constructors for classes where it's not
legitimate to construct them that way, so we should redesign the AllocBase
class so it doesn't require an empty constructor to compile.

There are also changes like this one:

-    NodeFeatureInfo<T> result = {node, info, numConstants};
+    NodeFeatureInfo<T> result = { node, info, numConstants };

That's just a formatting tweak so it should be in a separate patch. We don't
want a patch that makes a small change to a file but also strips all the
trailing spaces from that file. Those should be done separately.


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list