qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [RFC PATCH 3/6] RAMBlock: Add a name field


From: Alex Williamson
Subject: [Qemu-devel] Re: [RFC PATCH 3/6] RAMBlock: Add a name field
Date: Tue, 08 Jun 2010 14:09:40 -0600

On Tue, 2010-06-08 at 15:07 -0500, Anthony Liguori wrote:
> On 06/08/2010 02:15 PM, Alex Williamson wrote:
> > The offset given to a block created via qemu_ram_alloc/map() is arbitrary,
> > let the caller specify a name so we can make a positive match.
> >
> > Note, this only addresses the qemu-kvm callers so far.
> >
> > -ram_addr_t qemu_ram_map(ram_addr_t size, void *host)
> > +ram_addr_t qemu_ram_map(const char *name, ram_addr_t size, void *host)
> >   {
> >       RAMBlock *new_block;
> >
> >       size = TARGET_PAGE_ALIGN(size);
> >       new_block = qemu_malloc(sizeof(*new_block));
> >
> > +    // XXX check duplicates
> > +    snprintf(new_block->name, sizeof(new_block->name), "%s", strdup(name));
> >    
> 
> That strdup() is probably unintentional.

Yep, thanks.

Alex




reply via email to

[Prev in Thread] Current Thread [Next in Thread]