mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-18 15:42:09 -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
|
@ -70,7 +70,7 @@ static void buffer_append(struct XenConsole *con)
|
|||
|
||||
if ((buffer->capacity - buffer->size) < size) {
|
||||
buffer->capacity += (size + 1024);
|
||||
buffer->data = qemu_realloc(buffer->data, buffer->capacity);
|
||||
buffer->data = g_realloc(buffer->data, buffer->capacity);
|
||||
}
|
||||
|
||||
while (cons != prod)
|
||||
|
@ -89,7 +89,7 @@ static void buffer_append(struct XenConsole *con)
|
|||
uint8_t *maxpos = buffer->data + buffer->max_capacity;
|
||||
|
||||
memmove(maxpos - over, maxpos, over);
|
||||
buffer->data = qemu_realloc(buffer->data, buffer->max_capacity);
|
||||
buffer->data = g_realloc(buffer->data, buffer->max_capacity);
|
||||
buffer->size = buffer->capacity = buffer->max_capacity;
|
||||
|
||||
if (buffer->consumed > buffer->max_capacity - over)
|
||||
|
@ -208,7 +208,7 @@ static int con_init(struct XenDevice *xendev)
|
|||
xenstore_store_pv_console_info(con->xendev.dev, con->chr);
|
||||
|
||||
out:
|
||||
qemu_free(type);
|
||||
g_free(type);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue