qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] vl.c: remove init_clocks call from main


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] vl.c: remove init_clocks call from main
Date: Tue, 6 May 2014 17:01:01 +0100

On 6 May 2014 16:57, Alex Bligh <address@hidden> 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 <address@hidden>
>> ---
>> 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



reply via email to

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