mirror of
https://github.com/mii443/qemu.git
synced 2025-12-16 17:18:49 +00: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:
8
hw/ppc.c
8
hw/ppc.c
@@ -761,7 +761,7 @@ clk_setup_cb cpu_ppc_tb_init (CPUState *env, uint32_t freq)
|
||||
{
|
||||
ppc_tb_t *tb_env;
|
||||
|
||||
tb_env = qemu_mallocz(sizeof(ppc_tb_t));
|
||||
tb_env = g_malloc0(sizeof(ppc_tb_t));
|
||||
env->tb_env = tb_env;
|
||||
/* Create new timer */
|
||||
tb_env->decr_timer = qemu_new_timer_ns(vm_clock, &cpu_ppc_decr_cb, env);
|
||||
@@ -1038,9 +1038,9 @@ clk_setup_cb ppc_emb_timers_init (CPUState *env, uint32_t freq,
|
||||
ppc_tb_t *tb_env;
|
||||
ppcemb_timer_t *ppcemb_timer;
|
||||
|
||||
tb_env = qemu_mallocz(sizeof(ppc_tb_t));
|
||||
tb_env = g_malloc0(sizeof(ppc_tb_t));
|
||||
env->tb_env = tb_env;
|
||||
ppcemb_timer = qemu_mallocz(sizeof(ppcemb_timer_t));
|
||||
ppcemb_timer = g_malloc0(sizeof(ppcemb_timer_t));
|
||||
tb_env->tb_freq = freq;
|
||||
tb_env->decr_freq = freq;
|
||||
tb_env->opaque = ppcemb_timer;
|
||||
@@ -1145,7 +1145,7 @@ int ppc_dcr_init (CPUState *env, int (*read_error)(int dcrn),
|
||||
{
|
||||
ppc_dcr_t *dcr_env;
|
||||
|
||||
dcr_env = qemu_mallocz(sizeof(ppc_dcr_t));
|
||||
dcr_env = g_malloc0(sizeof(ppc_dcr_t));
|
||||
dcr_env->read_error = read_error;
|
||||
dcr_env->write_error = write_error;
|
||||
env->dcr_env = dcr_env;
|
||||
|
||||
Reference in New Issue
Block a user