On 6 May 2014 16:57, Alex Bligh <[email protected]> wrote: > > On 6 May 2014, at 13:59, Kirill Batuzov wrote: > >> Clocks are initialized in qemu_init_main_loop. They are not needed before it. >> Initializing them twice is not only unnecessary but is harmful: it results in >> memory leak and potentially can lead to a situation where different parts of >> QEMU use different sets of timers. >> >> To avoid it remove init_clocks call from main and add an assertion to >> qemu_clock_init that corresponding clock has not been initialized yet. >> >> Signed-off-by: Kirill Batuzov <[email protected]> >> --- >> qemu-timer.c | 3 +++ >> vl.c | 1 - >> 2 files changed, 3 insertions(+), 1 deletion(-)
> So if I read this right, init_clocks() is now only done in vl.c. No, you're misreading it -- the commit message says "remove init_clocks call from main" and you can see from the diffstat it's removed from vl.c. It's now done only in qemu_clock_init(). thanks -- PMM
