<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [GStreamer] use FastMalloc-based GstAllocator"
href="https://bugs.webkit.org/show_bug.cgi?id=165793#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [GStreamer] use FastMalloc-based GstAllocator"
href="https://bugs.webkit.org/show_bug.cgi?id=165793">bug 165793</a>
from <span class="vcard"><a class="email" href="mailto:calvaris@igalia.com" title="Xabier RodrÃguez Calvar <calvaris@igalia.com>"> <span class="fn">Xabier RodrÃguez Calvar</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=296994&action=diff" name="attach_296994" title="WIP">attachment 296994</a> <a href="attachment.cgi?id=296994&action=edit" title="WIP">[details]</a></span>
WIP
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=296994&action=review">https://bugs.webkit.org/attachment.cgi?id=296994&action=review</a>
<span class="quote">> Source/WebCore/platform/graphics/gstreamer/GStreamerUtilities.cpp:161
> + fprintf(stderr, "initializeGStreamer(): using FastMalloc allocator %p\n", allocator);</span >
I would GST_INFO this, though it would require to add a debug category for this.
<span class="quote">> Source/WebCore/platform/graphics/gstreamer/GstAllocatorFastMalloc.cpp:36
> + auto* mem = reinterpret_cast<GstMemoryFastMalloc*>(fastAlignedMalloc(alignment + 1, headerSize + allocationSize));</span >
I prefer typed things when they are non-trivial, which IMHO is the case.
<span class="quote">> Source/WebCore/platform/graphics/gstreamer/GstAllocatorFastMalloc.cpp:40
> + mem->data = reinterpret_cast<guint8*>(mem) + headerSize;</span >
uint8_t
<span class="quote">> Source/WebCore/platform/graphics/gstreamer/GstAllocatorFastMalloc.cpp:53
> +static void gst_allocator_fast_malloc_free(GstAllocator*, GstMemory* mem)</span >
I would ASSERT here if the allocator is right.
<span class="quote">> Source/WebCore/platform/graphics/gstreamer/GstAllocatorFastMalloc.cpp:82
> + auto* copy = reinterpret_cast<GstMemoryFastMalloc*>(fastAlignedMalloc(alignment + 1, headerSize + allocationSize));</span >
Proper typing?
<span class="quote">> Source/WebCore/platform/graphics/gstreamer/GstAllocatorFastMalloc.cpp:89
> + copy->data = reinterpret_cast<guint8*>(copy) + headerSize;</span >
uint8_t
<span class="quote">> Source/WebCore/platform/graphics/gstreamer/GstAllocatorFastMalloc.cpp:104
> + auto* sharedMem = reinterpret_cast<GstMemoryFastMalloc*>(fastMalloc(sizeof(GstMemoryFastMalloc)));</span >
Proper typing?
<span class="quote">> Source/WebCore/platform/graphics/gstreamer/GstAllocatorFastMalloc.cpp:118
> + auto* parent = reinterpret_cast<GstMemoryFastMalloc*>(mem1->base.parent);</span >
Proper typing?
<span class="quote">> Source/WebCore/platform/graphics/gstreamer/GstAllocatorFastMalloc.cpp:135
> + auto* gobjectClass = G_OBJECT_CLASS(klass);
> + gobjectClass->finalize = gst_allocator_fast_malloc_finalize;
> +
> + auto* gstAllocatorClass = GST_ALLOCATOR_CLASS(klass);</span >
Proper typing?
<span class="quote">> Source/WebCore/platform/graphics/gstreamer/GstAllocatorFastMalloc.h:29
> + guint8* data;</span >
uint8_t</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>