Changeset 211814 in webkit


Ignore:
Timestamp:
Feb 7, 2017 9:59:16 AM (7 years ago)
Author:
zandobersek@gmail.com
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):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r211807 r211814  
     12017-02-07  Zan Dobersek  <zdobersek@igalia.com>
     2
     3        MediaSourceClientGStreamerMSE: wrap FastMalloc-ed memory into pipeline-bound GstBuffers
     4        https://bugs.webkit.org/show_bug.cgi?id=167928
     5
     6        Reviewed by Xabier Rodriguez-Calvar.
     7
     8        The buffers created in MediaSourceClientGStreamerMSE can be large enough in size
     9        that repetitive allocations can cause larger heap fragmentation in different libc
     10        allocators. To avoid that occurrence, we should simply use FastMalloc to allocate
     11        memory for these buffers.
     12
     13        * platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.cpp:
     14        (WebCore::MediaSourceClientGStreamerMSE::append):
     15
    1162017-02-07  Antoine Quint  <graouts@apple.com>
    217
  • trunk/Source/WebCore/platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.cpp

    r209797 r211814  
    134134    ASSERT(appendPipeline);
    135135
    136     GstBuffer* buffer = gst_buffer_new_and_alloc(length);
     136    void* bufferData = fastMalloc(length);
     137    GstBuffer* buffer = gst_buffer_new_wrapped_full(static_cast<GstMemoryFlags>(0), bufferData, length, 0, length, bufferData, fastFree);
    137138    gst_buffer_fill(buffer, 0, data, length);
    138139
Note: See TracChangeset for help on using the changeset viewer.