mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-30 22:03: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
18
hw/omap_l4.c
18
hw/omap_l4.c
|
@ -120,7 +120,7 @@ struct omap_l4_s {
|
|||
|
||||
struct omap_l4_s *omap_l4_init(target_phys_addr_t base, int ta_num)
|
||||
{
|
||||
struct omap_l4_s *bus = qemu_mallocz(
|
||||
struct omap_l4_s *bus = g_malloc0(
|
||||
sizeof(*bus) + ta_num * sizeof(*bus->ta));
|
||||
|
||||
bus->ta_num = ta_num;
|
||||
|
@ -128,19 +128,19 @@ struct omap_l4_s *omap_l4_init(target_phys_addr_t base, int ta_num)
|
|||
|
||||
#ifdef L4_MUX_HACK
|
||||
omap_l4_io_entries = 1;
|
||||
omap_l4_io_entry = qemu_mallocz(125 * sizeof(*omap_l4_io_entry));
|
||||
omap_l4_io_entry = g_malloc0(125 * sizeof(*omap_l4_io_entry));
|
||||
|
||||
omap_cpu_io_entry =
|
||||
cpu_register_io_memory(omap_l4_io_readfn,
|
||||
omap_l4_io_writefn, bus, DEVICE_NATIVE_ENDIAN);
|
||||
# define L4_PAGES (0xb4000 / TARGET_PAGE_SIZE)
|
||||
omap_l4_io_readb_fn = qemu_mallocz(sizeof(void *) * L4_PAGES);
|
||||
omap_l4_io_readh_fn = qemu_mallocz(sizeof(void *) * L4_PAGES);
|
||||
omap_l4_io_readw_fn = qemu_mallocz(sizeof(void *) * L4_PAGES);
|
||||
omap_l4_io_writeb_fn = qemu_mallocz(sizeof(void *) * L4_PAGES);
|
||||
omap_l4_io_writeh_fn = qemu_mallocz(sizeof(void *) * L4_PAGES);
|
||||
omap_l4_io_writew_fn = qemu_mallocz(sizeof(void *) * L4_PAGES);
|
||||
omap_l4_io_opaque = qemu_mallocz(sizeof(void *) * L4_PAGES);
|
||||
omap_l4_io_readb_fn = g_malloc0(sizeof(void *) * L4_PAGES);
|
||||
omap_l4_io_readh_fn = g_malloc0(sizeof(void *) * L4_PAGES);
|
||||
omap_l4_io_readw_fn = g_malloc0(sizeof(void *) * L4_PAGES);
|
||||
omap_l4_io_writeb_fn = g_malloc0(sizeof(void *) * L4_PAGES);
|
||||
omap_l4_io_writeh_fn = g_malloc0(sizeof(void *) * L4_PAGES);
|
||||
omap_l4_io_writew_fn = g_malloc0(sizeof(void *) * L4_PAGES);
|
||||
omap_l4_io_opaque = g_malloc0(sizeof(void *) * L4_PAGES);
|
||||
#endif
|
||||
|
||||
return bus;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue