mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-29 05:13:54 -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
|
@ -1091,7 +1091,7 @@ static int cpu_sparc_register(CPUSPARCState *env, const char *cpu_model)
|
|||
if (cpu_sparc_find_by_name(def, cpu_model) < 0)
|
||||
return -1;
|
||||
|
||||
env->def = qemu_mallocz(sizeof(*def));
|
||||
env->def = g_malloc0(sizeof(*def));
|
||||
memcpy(env->def, def, sizeof(*def));
|
||||
#if defined(CONFIG_USER_ONLY)
|
||||
if ((env->def->features & CPU_FEATURE_FLOAT))
|
||||
|
@ -1124,7 +1124,7 @@ CPUSPARCState *cpu_sparc_init(const char *cpu_model)
|
|||
{
|
||||
CPUSPARCState *env;
|
||||
|
||||
env = qemu_mallocz(sizeof(CPUSPARCState));
|
||||
env = g_malloc0(sizeof(CPUSPARCState));
|
||||
cpu_exec_init(env);
|
||||
|
||||
gen_intermediate_code_init(env);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue