[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Re: [PATCH 0/9] Virtio cleanups
From: |
Jamie Lokier |
Subject: |
Re: [Qemu-devel] Re: [PATCH 0/9] Virtio cleanups |
Date: |
Sun, 21 Mar 2010 18:11:43 +0000 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Michael S. Tsirkin wrote:
> That's version 1 of my patch. Version 2 removed even need for macro
> completely by moving allocations to the caller.
The downside of moving allocations are: (1) it's one more call in the
caller, to allocate the type, (2) it needs a virtual destructor for
each type to free the object, which can clutter the code if there is
no other reason for virtual destructors.
I don't think those are necessarily bad, but they can remove from the
neatness of existing code. Personally I favour an occasional macro
using sizeof/offsetof/container_of if the result is a natural and
sensible API to all of its callers.
-- Jamie
- [Qemu-devel] Re: [PATCH 0/9] Virtio cleanups, (continued)
- [Qemu-devel] Re: [PATCH 0/9] Virtio cleanups, Juan Quintela, 2010/03/18
- [Qemu-devel] Re: [PATCH 0/9] Virtio cleanups, Michael S. Tsirkin, 2010/03/18
- [Qemu-devel] Re: [PATCH 0/9] Virtio cleanups, Juan Quintela, 2010/03/18
- [Qemu-devel] Re: [PATCH 0/9] Virtio cleanups, Michael S. Tsirkin, 2010/03/18
- [Qemu-devel] Re: [PATCH 0/9] Virtio cleanups, Juan Quintela, 2010/03/18
- [Qemu-devel] Re: [PATCH 0/9] Virtio cleanups, Michael S. Tsirkin, 2010/03/18
- [Qemu-devel] Re: [PATCH 0/9] Virtio cleanups, Juan Quintela, 2010/03/18
- [Qemu-devel] Re: [PATCH 0/9] Virtio cleanups, Michael S. Tsirkin, 2010/03/18
- Re: [Qemu-devel] Re: [PATCH 0/9] Virtio cleanups, Jamie Lokier, 2010/03/18
- Re: [Qemu-devel] Re: [PATCH 0/9] Virtio cleanups, Michael S. Tsirkin, 2010/03/21
- Re: [Qemu-devel] Re: [PATCH 0/9] Virtio cleanups,
Jamie Lokier <=
- Re: [Qemu-devel] Re: [PATCH 0/9] Virtio cleanups, Michael S. Tsirkin, 2010/03/21
- [Qemu-devel] Re: [PATCH 0/9] Virtio cleanups, Juan Quintela, 2010/03/21
- Re: [Qemu-devel] Re: [PATCH 0/9] Virtio cleanups, Anthony Liguori, 2010/03/21
- Re: [Qemu-devel] Re: [PATCH 0/9] Virtio cleanups, Paul Brook, 2010/03/22
- Re: [Qemu-devel] Re: [PATCH 0/9] Virtio cleanups, Anthony Liguori, 2010/03/22
- Re: [Qemu-devel] Re: [PATCH 0/9] Virtio cleanups, Michael S. Tsirkin, 2010/03/22
- Re: [Qemu-devel] Re: [PATCH 0/9] Virtio cleanups, Anthony Liguori, 2010/03/22
- Re: [Qemu-devel] Re: [PATCH 0/9] Virtio cleanups, Michael S. Tsirkin, 2010/03/22
- Re: [Qemu-devel] Re: [PATCH 0/9] Virtio cleanups, Anthony Liguori, 2010/03/22
- Re: [Qemu-devel] Re: [PATCH 0/9] Virtio cleanups, Paul Brook, 2010/03/22