qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 0/4] qemu-timer: introduce usable pointer-free A


From: Fam Zheng
Subject: Re: [Qemu-devel] [PATCH 0/4] qemu-timer: introduce usable pointer-free API
Date: Sat, 10 Jan 2015 09:35:57 +0800
User-agent: Mutt/1.5.23 (2014-03-12)

On Fri, 01/09 10:07, Paolo Bonzini wrote:
> 
> 
> On 09/01/2015 03:10, Fam Zheng wrote:
> > On Thu, 01/08 11:03, Paolo Bonzini wrote:
> >> The current pointer free API for timers is very low level.  Introduce
> >> a new API that matches timer_new_ns/us/ms and also a new API timer_deinit
> >> that can be used instead of timer_free.
> >>
> >> Finally, mechanically change timer macro names in vmstate, to make it
> >> clear that they accept a pointer.
> >>
> >> This prepares for conversion of timers from QEMUTimer * to QEMUTimer.
> > 
> > Novice question: what's the advantage, please?
> 
> No need to free them, so no memory leaks.  From a quick look I found two
> (hw/net/pcnet.c and hw/char/serial.c).
> 
> Also it matches more recent device model APIs like memory regions or
> throttling.

Get it! Thanks.

Fam



reply via email to

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