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