Title: [224097] releases/WebKitGTK/webkit-2.18/Source/bmalloc
- Revision
- 224097
- Author
- [email protected]
- Date
- 2017-10-27 01:47:54 -0700 (Fri, 27 Oct 2017)
Log Message
Merge r223844 - bmalloc::api::tryLargeMemalignVirtual() shouldn't assert on a failed allocation
https://bugs.webkit.org/show_bug.cgi?id=178654
Reviewed by Geoffrey Garen.
* bmalloc/bmalloc.h:
(bmalloc::api::tryLargeMemalignVirtual): Call Heap::tryAllocateLarge()
instead of Heap::allocateLarge(). The former will return a null pointer
upon a failed allocation, allowing the caller to fail gracefully just as
the API entrypoint implies, while the latter currently provokes a crash
in these circumstances.
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.18/Source/bmalloc/ChangeLog (224096 => 224097)
--- releases/WebKitGTK/webkit-2.18/Source/bmalloc/ChangeLog 2017-10-27 08:45:39 UTC (rev 224096)
+++ releases/WebKitGTK/webkit-2.18/Source/bmalloc/ChangeLog 2017-10-27 08:47:54 UTC (rev 224097)
@@ -1,3 +1,17 @@
+2017-10-23 Zan Dobersek <[email protected]>
+
+ bmalloc::api::tryLargeMemalignVirtual() shouldn't assert on a failed allocation
+ https://bugs.webkit.org/show_bug.cgi?id=178654
+
+ Reviewed by Geoffrey Garen.
+
+ * bmalloc/bmalloc.h:
+ (bmalloc::api::tryLargeMemalignVirtual): Call Heap::tryAllocateLarge()
+ instead of Heap::allocateLarge(). The former will return a null pointer
+ upon a failed allocation, allowing the caller to fail gracefully just as
+ the API entrypoint implies, while the latter currently provokes a crash
+ in these circumstances.
+
2017-10-05 Filip Pizlo <[email protected]>
Use one Scavenger thread for all Heaps
Modified: releases/WebKitGTK/webkit-2.18/Source/bmalloc/bmalloc/bmalloc.h (224096 => 224097)
--- releases/WebKitGTK/webkit-2.18/Source/bmalloc/bmalloc/bmalloc.h 2017-10-27 08:45:39 UTC (rev 224096)
+++ releases/WebKitGTK/webkit-2.18/Source/bmalloc/bmalloc/bmalloc.h 2017-10-27 08:47:54 UTC (rev 224097)
@@ -70,7 +70,7 @@
{
Heap& heap = PerProcess<PerHeapKind<Heap>>::get()->at(kind);
std::lock_guard<StaticMutex> lock(Heap::mutex());
- return heap.allocateLarge(lock, alignment, size, AllocationKind::Virtual);
+ return heap.tryAllocateLarge(lock, alignment, size, AllocationKind::Virtual);
}
inline void free(void* object, HeapKind kind = HeapKind::Primary)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes