summaryrefslogtreecommitdiff
path: root/hw/soc_dma.c
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2008-08-06 08:37:17 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2008-08-06 08:37:17 +0000
commit2137b4cca9af2ca22b527ef9f3835c532511453d (patch)
treeb758c587161d84c6c2b535f2fdedc48039282170 /hw/soc_dma.c
parentbf6bca527c11dff117990acdeb8cb425e985788a (diff)
Add qemu_realloc(), by Gerd Hoffmann.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4986 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/soc_dma.c')
-rw-r--r--hw/soc_dma.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/soc_dma.c b/hw/soc_dma.c
index 4ff8cae7c2..4c87c8b9bd 100644
--- a/hw/soc_dma.c
+++ b/hw/soc_dma.c
@@ -50,7 +50,7 @@ static int fifo_size;
void transfer_fifo2fifo(struct soc_dma_ch_s *ch)
{
if (ch->bytes > fifo_size)
- fifo_buf = realloc(fifo_buf, fifo_size = ch->bytes);
+ fifo_buf = qemu_realloc(fifo_buf, fifo_size = ch->bytes);
/* Implement as transfer_fifo2linear + transfer_linear2fifo. */
ch->io_fn[0](ch->io_opaque[0], fifo_buf, ch->bytes);
@@ -262,7 +262,7 @@ void soc_dma_port_add_fifo(struct soc_dma_s *soc, target_phys_addr_t virt_base,
struct memmap_entry_s *entry;
struct dma_s *dma = (struct dma_s *) soc;
- dma->memmap = realloc(dma->memmap, sizeof(*entry) *
+ dma->memmap = qemu_realloc(dma->memmap, sizeof(*entry) *
(dma->memmap_size + 1));
entry = soc_dma_lookup(dma, virt_base);
@@ -314,7 +314,7 @@ void soc_dma_port_add_mem(struct soc_dma_s *soc, uint8_t *phys_base,
struct memmap_entry_s *entry;
struct dma_s *dma = (struct dma_s *) soc;
- dma->memmap = realloc(dma->memmap, sizeof(*entry) *
+ dma->memmap = qemu_realloc(dma->memmap, sizeof(*entry) *
(dma->memmap_size + 1));
entry = soc_dma_lookup(dma, virt_base);