Title: [243667] trunk/Source/_javascript_Core
Revision
243667
Author
ysuz...@apple.com
Date
2019-03-29 16:33:31 -0700 (Fri, 29 Mar 2019)

Log Message

[JSC] Remove distancing for LargeAllocation
https://bugs.webkit.org/show_bug.cgi?id=196335

Reviewed by Saam Barati.

In r230226, we removed distancing feature from our GC. This patch removes remaining distancing thing in LargeAllocation.

* heap/HeapCell.h:
* heap/LargeAllocation.cpp:
(JSC::LargeAllocation::tryCreate):
* heap/MarkedBlock.h:

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (243666 => 243667)


--- trunk/Source/_javascript_Core/ChangeLog	2019-03-29 22:18:59 UTC (rev 243666)
+++ trunk/Source/_javascript_Core/ChangeLog	2019-03-29 23:33:31 UTC (rev 243667)
@@ -1,3 +1,17 @@
+2019-03-29  Yusuke Suzuki  <ysuz...@apple.com>
+
+        [JSC] Remove distancing for LargeAllocation
+        https://bugs.webkit.org/show_bug.cgi?id=196335
+
+        Reviewed by Saam Barati.
+
+        In r230226, we removed distancing feature from our GC. This patch removes remaining distancing thing in LargeAllocation.
+
+        * heap/HeapCell.h:
+        * heap/LargeAllocation.cpp:
+        (JSC::LargeAllocation::tryCreate):
+        * heap/MarkedBlock.h:
+
 2019-03-29  Myles C. Maxfield  <mmaxfi...@apple.com>
 
         Delete WebMetal implementation in favor of WebGPU

Modified: trunk/Source/_javascript_Core/heap/HeapCell.h (243666 => 243667)


--- trunk/Source/_javascript_Core/heap/HeapCell.h	2019-03-29 22:18:59 UTC (rev 243666)
+++ trunk/Source/_javascript_Core/heap/HeapCell.h	2019-03-29 23:33:31 UTC (rev 243667)
@@ -37,8 +37,6 @@
 class VM;
 struct CellAttributes;
 
-static constexpr unsigned minimumDistanceBetweenCellsFromDifferentOrigins = sizeof(void*) == 8 ? 304 : 288;
-
 class HeapCell {
 public:
     enum Kind : int8_t {

Modified: trunk/Source/_javascript_Core/heap/LargeAllocation.cpp (243666 => 243667)


--- trunk/Source/_javascript_Core/heap/LargeAllocation.cpp	2019-03-29 22:18:59 UTC (rev 243666)
+++ trunk/Source/_javascript_Core/heap/LargeAllocation.cpp	2019-03-29 23:33:31 UTC (rev 243667)
@@ -39,18 +39,12 @@
     if (validateDFGDoesGC)
         RELEASE_ASSERT(heap.expectDoesGC());
 
-    // This includes padding at the end of the allocation to maintain the distancing constraint.
-    constexpr size_t distancing = minimumDistanceBetweenCellsFromDifferentOrigins;
-    size_t sizeBeforeDistancing = headerSize() + size;
-    size_t sizeIncludingDistancing = sizeBeforeDistancing + distancing;
+    size_t allocationSize = headerSize() + size;
     
-    void* space = subspace->alignedMemoryAllocator()->tryAllocateAlignedMemory(alignment, sizeIncludingDistancing);
+    void* space = subspace->alignedMemoryAllocator()->tryAllocateAlignedMemory(alignment, allocationSize);
     if (!space)
         return nullptr;
     
-    // Make sure that the padding does not contain useful things.
-    memset(static_cast<char*>(space) + sizeBeforeDistancing, 0, distancing);
-    
     if (scribbleFreeCells())
         scribble(space, size);
     return new (NotNull, space) LargeAllocation(heap, size, subspace);

Modified: trunk/Source/_javascript_Core/heap/MarkedBlock.h (243666 => 243667)


--- trunk/Source/_javascript_Core/heap/MarkedBlock.h	2019-03-29 22:18:59 UTC (rev 243666)
+++ trunk/Source/_javascript_Core/heap/MarkedBlock.h	2019-03-29 23:33:31 UTC (rev 243667)
@@ -304,7 +304,6 @@
     static constexpr size_t footerSize = blockSize - payloadSize;
 
     static_assert(payloadSize == ((blockSize - sizeof(MarkedBlock::Footer)) & ~(atomSize - 1)), "Payload size computed the alternate way should give the same result");
-    static_assert(footerSize >= minimumDistanceBetweenCellsFromDifferentOrigins, "Footer is not big enough to create the necessary distance between objects from different origins");
     
     static MarkedBlock::Handle* tryCreate(Heap&, AlignedMemoryAllocator*);
         
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to