Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 24c117bd1a2ea6c01ba6a423f5d75f92780e4011
      
https://github.com/WebKit/WebKit/commit/24c117bd1a2ea6c01ba6a423f5d75f92780e4011
  Author: Mark Lam <[email protected]>
  Date:   2026-02-02 (Mon, 02 Feb 2026)

  Changed paths:
    M Source/bmalloc/bmalloc/TZoneHeap.h
    M Source/bmalloc/bmalloc/TZoneHeapInlines.h
    M Source/bmalloc/bmalloc/TZoneHeapManager.cpp
    M Source/bmalloc/bmalloc/TZoneHeapManager.h

  Log Message:
  -----------
  Remove SizeAndAlignment class in TZone code.
https://bugs.webkit.org/show_bug.cgi?id=306717
rdar://169370644

Reviewed by Keith Miller.

The SizeAndAlignment logic belongs in TZoneSpecification which defines a TZone 
type's
sorting algorithm / criteria.  This refactoring paves the way to add alternate 
TZone
categories that use different sorting algorithms for heap selection.

Also added some debugging info (file and line number) to TZoneSpecification 
because
classname alone is insufficient as there can be many classes with the same name.
Also enhanced TZoneHeapManager::dumpRegisteredTypes(0 to also print the pid to
distinguish between processes.

No new tests because this is a refactoring patch.  There is no behavior change..

* Source/bmalloc/bmalloc/TZoneHeap.h:
(bmalloc::api::TZoneDescriptorHashTrait::hash):
(bmalloc::api::TZoneSpecification::sizeClass const):
(bmalloc::api::TZoneSpecification::encodeSize):
(bmalloc::api::TZoneSpecification::encodeAlignment):
(bmalloc::api::TZoneSpecification::encodeDescriptor):
(bmalloc::api::SizeAndAlignment::encode): Deleted.
(bmalloc::api::SizeAndAlignment::decodeSize): Deleted.
(bmalloc::api::SizeAndAlignment::decodeAlignment): Deleted.
* Source/bmalloc/bmalloc/TZoneHeapInlines.h:
* Source/bmalloc/bmalloc/TZoneHeapManager.cpp:
(bmalloc::api::TZoneDescriptorDecoder::TZoneDescriptorDecoder):
(bmalloc::api::TZoneDescriptorDecoder::value const):
(bmalloc::api::TZoneDescriptorDecoder::sizeClass const):
(bmalloc::api::TZoneDescriptorDecoder::alignment const):
(bmalloc::api::TZoneHeapManager::dumpRegisteredTypes):
(bmalloc::api::TZoneHeapManager::bucketCountForSizeClass):
(bmalloc::api::TZoneHeapManager::bucketForKey):
(bmalloc::api::TZoneHeapManager::populateGroupBuckets):
(bmalloc::api::TZoneHeapManager::heapRefForTZoneType):
(bmalloc::api::TZoneHeapManager::TZoneHeapManager::heapRefForTZoneTypeDifferentSize):
* Source/bmalloc/bmalloc/TZoneHeapManager.h:

Canonical link: https://commits.webkit.org/306630@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to