mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 04:13:53 -06:00
Use glib memory allocation and free functions
qemu_malloc/qemu_free no longer exist after this commit. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
14015304b6
commit
7267c0947d
357 changed files with 1672 additions and 1674 deletions
|
@ -188,7 +188,7 @@ static void *sh_timer_init(uint32_t freq, int feat, qemu_irq irq)
|
|||
sh_timer_state *s;
|
||||
QEMUBH *bh;
|
||||
|
||||
s = (sh_timer_state *)qemu_mallocz(sizeof(sh_timer_state));
|
||||
s = (sh_timer_state *)g_malloc0(sizeof(sh_timer_state));
|
||||
s->freq = freq;
|
||||
s->feat = feat;
|
||||
s->tcor = 0xffffffff;
|
||||
|
@ -311,7 +311,7 @@ void tmu012_init(target_phys_addr_t base, int feat, uint32_t freq,
|
|||
tmu012_state *s;
|
||||
int timer_feat = (feat & TMU012_FEAT_EXTCLK) ? TIMER_FEAT_EXTCLK : 0;
|
||||
|
||||
s = (tmu012_state *)qemu_mallocz(sizeof(tmu012_state));
|
||||
s = (tmu012_state *)g_malloc0(sizeof(tmu012_state));
|
||||
s->feat = feat;
|
||||
s->timer[0] = sh_timer_init(freq, timer_feat, ch0_irq);
|
||||
s->timer[1] = sh_timer_init(freq, timer_feat, ch1_irq);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue