Hi Jukka,

On 03/19/2013 08:16 AM, Jukka Rissanen wrote:
On 18.03.2013 16:39, Daniel Wagner wrote:
On 03/18/2013 03:14 PM, Patrik Flykt wrote:
On Mon, 2013-03-18 at 15:36 +0200, Jukka Rissanen wrote:
Should this be g_try_new0() instead?
This requires then fixes in callers where return value checks would
be
needed.

With the assumption that this is "small enough", I don't think it's
needed. The next question obviously is how small is "small enough"...

The glib tracing dump showed that we have a lot of small blocks:

http://lists.connman.net/pipermail/connman/2012-December/012537.html

I would say 24 bytes is belongs to the category small :)


I thought/remembered that there was an unwritten rule to always use the
g_try_*() memory allocation variant.

I think this log here gives the background behind g_new0 instead of g_try_new0:

http://logs.nslu2-linux.org/livelogs/ofono/ofono.20110129.txt

cheers,
daniel

_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to