From a7baec719daa87d38b58228f16e813a73913a540 Mon Sep 17 00:00:00 2001 From: Eric Ruei Date: Mon, 10 Jun 2019 14:00:09 -0400 Subject: [PATCH] qtwebkit: bmalloc: increase the range of m_refCount for large page size With page size 64k, the maxmium m_refCount reach 256. Signed-off-by: Eric Ruei --- Source/bmalloc/bmalloc/SmallLine.h | 2 +- Source/bmalloc/bmalloc/SmallPage.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/bmalloc/bmalloc/SmallLine.h b/Source/bmalloc/bmalloc/SmallLine.h index 188930edc..7693acbc6 100644 --- a/Source/bmalloc/bmalloc/SmallLine.h +++ b/Source/bmalloc/bmalloc/SmallLine.h @@ -43,7 +43,7 @@ public: char* end(); private: - unsigned char m_refCount; + unsigned short m_refCount; static_assert( smallLineSize / alignment <= std::numeric_limits::max(), diff --git a/Source/bmalloc/bmalloc/SmallPage.h b/Source/bmalloc/bmalloc/SmallPage.h index 26e874859..89eddafc9 100644 --- a/Source/bmalloc/bmalloc/SmallPage.h +++ b/Source/bmalloc/bmalloc/SmallPage.h @@ -57,8 +57,8 @@ public: void setSlide(unsigned char slide) { m_slide = slide; } private: - unsigned char m_hasFreeLines: 1; - unsigned char m_refCount: 7; + unsigned short m_hasFreeLines: 1; + unsigned short m_refCount: 15; unsigned char m_sizeClass; unsigned char m_slide; -- 2.17.1