[webkit-reviews] review denied: [Bug 70883] [EFL] Use template functions instead of memory allocation of C functions : [Attachment 112826] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Oct 28 05:40:09 PDT 2011


Kenneth Rohde Christiansen <kenneth at webkit.org> has denied Gyuyoung Kim
<gyuyoung.kim at samsung.com>'s request for review:
Bug 70883: [EFL] Use template functions instead of memory allocation of C
functions
https://bugs.webkit.org/show_bug.cgi?id=70883

Attachment 112826: Patch
https://bugs.webkit.org/attachment.cgi?id=112826&action=review

------- Additional Comments from Kenneth Rohde Christiansen
<kenneth at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=112826&action=review


> Source/WebKit/efl/ewk/ewk_memory_allocation.h:28
> +template <typename struct_type> struct_type* eMalloc(size_t amount = 1)

Shouldn't these be inlined?

I would just call it enew or so, ie. keep it simple. And call the calling like
enew0() like gtk is doing g_new0(). In GTK the realloc method is called
g_renew().

> Source/WebKit/efl/ewk/ewk_tiled_backing_store.cpp:256
> +    request = eMalloc<Ewk_Tiled_Backing_Store_Pre_Render_Request>(1);

There is no point in writing the 1 here.

eMalloc<Ewk_Tiled_Backing_Store_Pre_Render_Request>()

does the same


More information about the webkit-reviews mailing list