mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07: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
|
@ -183,7 +183,7 @@ static void net_tx_packets(struct XenNetDev *netdev)
|
|||
if (txreq.flags & NETTXF_csum_blank) {
|
||||
/* have read-only mapping -> can't fill checksum in-place */
|
||||
if (!tmpbuf) {
|
||||
tmpbuf = qemu_malloc(XC_PAGE_SIZE);
|
||||
tmpbuf = g_malloc(XC_PAGE_SIZE);
|
||||
}
|
||||
memcpy(tmpbuf, page + txreq.offset, txreq.size);
|
||||
net_checksum_calculate(tmpbuf, txreq.size);
|
||||
|
@ -199,7 +199,7 @@ static void net_tx_packets(struct XenNetDev *netdev)
|
|||
}
|
||||
netdev->tx_work = 0;
|
||||
}
|
||||
qemu_free(tmpbuf);
|
||||
g_free(tmpbuf);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------- */
|
||||
|
@ -423,7 +423,7 @@ static int net_free(struct XenDevice *xendev)
|
|||
{
|
||||
struct XenNetDev *netdev = container_of(xendev, struct XenNetDev, xendev);
|
||||
|
||||
qemu_free(netdev->mac);
|
||||
g_free(netdev->mac);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue