[Webkit-unassigned] [Bug 209360] New: Can bmalloc work on systems with 64 kB pages?

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 20 13:35:56 PDT 2020


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

            Bug ID: 209360
           Summary: Can bmalloc work on systems with 64 kB pages?
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: bmalloc
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: mcatanzaro at gnome.org
                CC: ggaren at apple.com

Currently, WebKitFeatures.cmake enables bmalloc on aarch64, x86_64, arm, and mips. All other architectures build with USE_SYSTEM_MALLOC=ON.

It seems one of the reasons that bmalloc does not work on many CPU architectures is that it doesn't support systems with 64 kB page size. We can be confident of this because bmalloc on aarch64 works in Fedora (which uses 4 kB pages) but not in RHEL (64 kB pages).

Looking through bmalloc for potentially-problematic places, I found configSizeToProtect in Gigacage.h set to 16 kB, which is too small. I also found in Sizes.h:

static constexpr size_t smallLineSize = 256;
static constexpr size_t smallPageSize = 4 * kB;
static constexpr size_t smallPageLineCount = smallPageSize / smallLineSize;

static constexpr size_t maskSizeClassMax = 512;
static constexpr size_t smallMax = 32 * kB;

static constexpr size_t pageSizeMax = smallMax * 2;
static constexpr size_t pageClassCount = pageSizeMax / smallPageSize;

I guess we would need to raise smallPageSize and smallMax both to 64 kB?

Before I try this, are there any other theoretical problems that would stop bmalloc from working on a given CPU architecture? Are there page size assumptions anywhere else? Does it make endianness assumptions?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200320/75c24677/attachment-0001.htm>


More information about the webkit-unassigned mailing list