Ian Molton <ian.mol...@collabora.co.uk> writes:

> Markus Armbruster wrote:
>
>>     p = malloc(n * sizeof(struct foo);
>>     if (n && !p)
>>         exit_no_mem();
>>     for (i = 0; i < n; i++)
>>         compute_one(p, i);
>> 
>> With qemu_malloc(), the error handling moves into qemu_malloc():
>> 
>>     p = qemu_malloc(n * sizeof(struct foo);
>>     for (i = 0; i < n; i++)
>>         compute_one(p, i);
>
> And you lose the ability to fail gracefully...

That's a deliberate choice.  It has its drawbacks, it has its
advantages.  And it's not related to the question at hand: permitting
zero arguments.


Reply via email to