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...


Reply via email to