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:
Anthony Liguori 2011-08-20 22:09:37 -05:00
parent 14015304b6
commit 7267c0947d
357 changed files with 1672 additions and 1674 deletions

View file

@ -327,7 +327,7 @@ void configure_alarms(char const *opt)
exit(0);
}
arg = qemu_strdup(opt);
arg = g_strdup(opt);
/* Reorder the array */
name = strtok(arg, ",");
@ -356,7 +356,7 @@ next:
name = strtok(NULL, ",");
}
qemu_free(arg);
g_free(arg);
if (cur) {
/* Disable remaining timers */
@ -380,7 +380,7 @@ static QEMUClock *qemu_new_clock(int type)
{
QEMUClock *clock;
clock = qemu_mallocz(sizeof(QEMUClock));
clock = g_malloc0(sizeof(QEMUClock));
clock->type = type;
clock->enabled = 1;
notifier_list_init(&clock->reset_notifiers);
@ -485,7 +485,7 @@ QEMUTimer *qemu_new_timer(QEMUClock *clock, int scale,
{
QEMUTimer *ts;
ts = qemu_mallocz(sizeof(QEMUTimer));
ts = g_malloc0(sizeof(QEMUTimer));
ts->clock = clock;
ts->cb = cb;
ts->opaque = opaque;
@ -495,7 +495,7 @@ QEMUTimer *qemu_new_timer(QEMUClock *clock, int scale,
void qemu_free_timer(QEMUTimer *ts)
{
qemu_free(ts);
g_free(ts);
}
/* stop a timer, but do not dealloc it */