Title: [289718] trunk/Source/_javascript_Core
- Revision
- 289718
- Author
- [email protected]
- Date
- 2022-02-13 12:26:12 -0800 (Sun, 13 Feb 2022)
Log Message
Add comment on how StructureMemoryManager grows the free list when there are no free blocks.
https://bugs.webkit.org/show_bug.cgi?id=236568
Reviewed by Saam Barati.
Also, use uint8_t* rather than rely on the fact that `sizeof(MarkedBlock) == 1`.
* heap/StructureAlignedMemoryAllocator.cpp:
(JSC::StructureMemoryManager::tryMallocStructureBlock):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (289717 => 289718)
--- trunk/Source/_javascript_Core/ChangeLog 2022-02-13 20:22:24 UTC (rev 289717)
+++ trunk/Source/_javascript_Core/ChangeLog 2022-02-13 20:26:12 UTC (rev 289718)
@@ -1,5 +1,17 @@
2022-02-13 Keith Miller <[email protected]>
+ Add comment on how StructureMemoryManager grows the free list when there are no free blocks.
+ https://bugs.webkit.org/show_bug.cgi?id=236568
+
+ Reviewed by Saam Barati.
+
+ Also, use uint8_t* rather than rely on the fact that `sizeof(MarkedBlock) == 1`.
+
+ * heap/StructureAlignedMemoryAllocator.cpp:
+ (JSC::StructureMemoryManager::tryMallocStructureBlock):
+
+2022-02-13 Keith Miller <[email protected]>
+
Make StructureMemoryManager alignment assert a RELEASE_ASSERT
https://bugs.webkit.org/show_bug.cgi?id=236567
Modified: trunk/Source/_javascript_Core/heap/StructureAlignedMemoryAllocator.cpp (289717 => 289718)
--- trunk/Source/_javascript_Core/heap/StructureAlignedMemoryAllocator.cpp 2022-02-13 20:22:24 UTC (rev 289717)
+++ trunk/Source/_javascript_Core/heap/StructureAlignedMemoryAllocator.cpp 2022-02-13 20:26:12 UTC (rev 289718)
@@ -96,10 +96,11 @@
RELEASE_ASSERT(m_mappedHeapSize <= structureHeapAddressSize);
if (freeIndex * MarkedBlock::blockSize >= m_mappedHeapSize)
return nullptr;
+ // If we can't find a free block then `freeIndex == m_usedBlocks.bitCount()` and this set will grow the bit vector.
m_usedBlocks.set(freeIndex);
}
- MarkedBlock* block = reinterpret_cast<MarkedBlock*>(g_jscConfig.startOfStructureHeap) + freeIndex * MarkedBlock::blockSize;
+ auto* block = reinterpret_cast<uint8_t*>(g_jscConfig.startOfStructureHeap) + freeIndex * MarkedBlock::blockSize;
commitBlock(block);
return block;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes