LibWeb: Put most LibWeb GC objects in type-specific heap blocks

With this change, we now have ~1200 CellAllocators across both LibJS and
LibWeb in a normal WebContent instance.

This gives us a minimum heap size of 4.7 MiB in the scenario where we
only have one cell allocated per type. Of course, in practice there will
be many more of each type, so the effective overhead is quite a bit
smaller than that in practice.

I left a few types unconverted to this mechanism because I got tired of
doing this. :^)
This commit is contained in:
Andreas Kling 2023-11-19 19:47:52 +01:00
parent 536596632b
commit bfd354492e
Notes: sideshowbarker 2024-07-16 23:34:49 +09:00
599 changed files with 933 additions and 3 deletions

View file

@ -19,6 +19,8 @@
namespace Web::HTML {
JS_DEFINE_ALLOCATOR(HTMLObjectElement);
HTMLObjectElement::HTMLObjectElement(DOM::Document& document, DOM::QualifiedName qualified_name)
: NavigableContainer(document, move(qualified_name))
{