Title: [211814] trunk/Source/WebCore
- Revision
- 211814
- Author
- zandober...@gmail.com
- Date
- 2017-02-07 09:59:16 -0800 (Tue, 07 Feb 2017)
Log Message
MediaSourceClientGStreamerMSE: wrap FastMalloc-ed memory into pipeline-bound GstBuffers
https://bugs.webkit.org/show_bug.cgi?id=167928
Reviewed by Xabier Rodriguez-Calvar.
The buffers created in MediaSourceClientGStreamerMSE can be large enough in size
that repetitive allocations can cause larger heap fragmentation in different libc
allocators. To avoid that occurrence, we should simply use FastMalloc to allocate
memory for these buffers.
* platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.cpp:
(WebCore::MediaSourceClientGStreamerMSE::append):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (211813 => 211814)
--- trunk/Source/WebCore/ChangeLog 2017-02-07 17:20:57 UTC (rev 211813)
+++ trunk/Source/WebCore/ChangeLog 2017-02-07 17:59:16 UTC (rev 211814)
@@ -1,3 +1,18 @@
+2017-02-07 Zan Dobersek <zdober...@igalia.com>
+
+ MediaSourceClientGStreamerMSE: wrap FastMalloc-ed memory into pipeline-bound GstBuffers
+ https://bugs.webkit.org/show_bug.cgi?id=167928
+
+ Reviewed by Xabier Rodriguez-Calvar.
+
+ The buffers created in MediaSourceClientGStreamerMSE can be large enough in size
+ that repetitive allocations can cause larger heap fragmentation in different libc
+ allocators. To avoid that occurrence, we should simply use FastMalloc to allocate
+ memory for these buffers.
+
+ * platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.cpp:
+ (WebCore::MediaSourceClientGStreamerMSE::append):
+
2017-02-07 Antoine Quint <grao...@apple.com>
[Modern Media Controls] Handle media durations of an hour or more gracefully
Modified: trunk/Source/WebCore/platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.cpp (211813 => 211814)
--- trunk/Source/WebCore/platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.cpp 2017-02-07 17:20:57 UTC (rev 211813)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.cpp 2017-02-07 17:59:16 UTC (rev 211814)
@@ -133,7 +133,8 @@
ASSERT(appendPipeline);
- GstBuffer* buffer = gst_buffer_new_and_alloc(length);
+ void* bufferData = fastMalloc(length);
+ GstBuffer* buffer = gst_buffer_new_wrapped_full(static_cast<GstMemoryFlags>(0), bufferData, length, 0, length, bufferData, fastFree);
gst_buffer_fill(buffer, 0, data, length);
return appendPipeline->pushNewBuffer(buffer) == GST_FLOW_OK;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes