summary refs log tree commit diff stats
path: root/hw/lm32_uart.c
diff options
context:
space:
mode:
authorFabien Chouteau <chouteau@adacore.com>2013-02-19 04:41:11 +0000
committerAlexander Graf <agraf@suse.de>2013-03-08 21:04:52 +0100
commitd60fa42e8bae39440f997ebfe8fe328269a57d16 (patch)
tree23e40a2deb58d4dac1c90bb75d3b5e3660746dd9 /hw/lm32_uart.c
parent6bbd5dde9a10520eb069c4bff9f2e34b96b1cfee (diff)
downloadfocaccia-qemu-d60fa42e8bae39440f997ebfe8fe328269a57d16.tar.gz
focaccia-qemu-d60fa42e8bae39440f997ebfe8fe328269a57d16.zip
Save memory allocation in the elf loader
The current elf loader uses too much memory. For example, I have a
executable with a bss section of 400 MB and I set the ram size to 512
MB. Qemu uses about 780MB of RAM (which is fine), but there's a peak at
1.6 GB during initialization (this is not fine).

This patch fixes two things:
 1) do not allocate each elf program twice.
 2) do not allocate memory for areas that are only zeros.

For this we need a new field in Rom: "datasize" which is the size of the
allocated data. If datasize is less than romsize, it means that the area
from datasize to romsize is filled with zeros.

Signed-off-by: Fabien Chouteau <chouteau@adacore.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'hw/lm32_uart.c')
0 files changed, 0 insertions, 0 deletions