On Tue, Jul 29, 2014 at 05:54:43PM -0400, John Snow wrote: > diff --git a/tests/libqos/malloc-pc.c b/tests/libqos/malloc-pc.c > index 2efd095..410181d 100644 > --- a/tests/libqos/malloc-pc.c > +++ b/tests/libqos/malloc-pc.c > @@ -21,41 +21,336 @@ > > #define PAGE_SIZE (4096) > > +typedef struct mem_block {
QEMU generally uses CamelCase for struct tags too. The name can be the same as the typedef (MemBlock). > + struct mem_block *prev; > + struct mem_block *next; Please see include/qemu/queue.h for variants of linked lists. QTAILQ should work, then you can drop your custom doubly-linked list code. > + fprintf(stderr, "guest malloc leak @ 0x%016lx size 0x%016lx\n", > + node->addr, node->size); On 32-bit hosts %lx is 32-bit but addr is uint64_t. Please use the PRIx64 macro here and for other instances in this patch.
pgplGABLBSf4n.pgp
Description: PGP signature