Original Xbox Emulator for Windows, macOS, and Linux (Active Development)
Go to file
Fabien Chouteau d60fa42e8b 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>
2013-03-08 21:04:52 +01:00
QMP qmp: add pull_event function 2012-10-24 10:26:22 +02:00
audio audio: Replace non-portable asprintf in debug code by g_strdup_printf 2013-01-16 12:03:26 -06:00
backends Make all static TypeInfos const 2013-01-10 15:11:53 -06:00
block sheepdog: add support for connecting to unix domain socket 2013-03-04 09:54:17 +01:00
bsd-user qemu-log: default to stderr for logging output 2013-02-26 13:31:47 -06:00
default-configs hw/sdhci: introduce standard SD host controller 2013-02-28 18:23:14 +00:00
disas Replace all setjmp()/longjmp() with sigsetjmp()/siglongjmp() 2013-02-23 16:11:19 +00:00
docs trace: Fix location of simpletrace.py in docs 2013-02-05 21:52:55 +01:00
fpu softfloat: Handle float_muladd_negate_c when product is zero 2013-01-26 13:22:09 +00:00
fsdev virtfs-proxy-helper: Fix unchecked strdup() by conv. to g_strdup() 2013-01-30 11:14:46 +01:00
gdb-xml gdb-xml: fix hacks in powerpc register numbering 2009-07-12 23:42:05 +02:00
hw Save memory allocation in the elf loader 2013-03-08 21:04:52 +01:00
include Merge remote-tracking branch 'stefanha/block' into staging 2013-03-04 08:22:48 -06:00
ldscripts build: create ldscripts/ 2012-12-19 08:29:06 +01:00
libcacard libcacard: Fix unchecked strdup() by converting to g_strdup() 2013-01-30 11:14:46 +01:00
linux-headers linux-headers: resync from mainline to add ARM KVM headers 2013-03-05 00:34:40 +00:00
linux-user mipsn32-linux-user: Configure the architecture properly 2013-03-05 15:04:20 +01:00
net net: reduce the unnecessary memory allocation of multiqueue 2013-02-27 16:10:47 +01:00
pc-bios update seabios to 1.7.2.1 2013-02-28 09:19:00 +01:00
pixman@97336fad32 qapi: move include files to include/qobject/ 2012-12-19 08:31:31 +01:00
po ui/gtk: Use menu item from stock for full screen 2013-02-22 14:49:00 -06:00
qapi qapi: Fix unchecked strdup() by converting to g_strdup() 2013-01-30 11:14:46 +01:00
qga qemu-ga: Fix unchecked strdup() by converting to g_strdup() 2013-01-30 11:14:46 +01:00
qobject build: move qobject files to qobject/ and libqemuutil.a 2013-01-12 18:42:50 +01:00
qom qom/object.c: Allow itf cast with num_itfs = 0 2013-02-21 16:34:10 -06:00
roms update seabios to 1.7.2.1 2013-02-28 09:19:00 +01:00
scripts fix scripts/make_device_config.sh 2013-02-19 11:53:49 +01:00
slirp move socket_set_nodelay to osdep.c 2013-03-04 09:54:17 +01:00
stubs slirp: switch to GPollFD 2013-02-21 16:17:31 -06:00
sysconfigs/target Eliminate cpus-x86_64.conf file 2012-09-21 15:12:58 +02:00
target-alpha gen-icount.h: Rename gen_icount_start/end to gen_tb_start/end 2013-03-03 14:29:08 +00:00
target-arm target-arm: Use MemoryListener to identify GIC base address for KVM 2013-03-05 00:45:25 +00:00
target-cris gen-icount.h: Rename gen_icount_start/end to gen_tb_start/end 2013-03-03 14:29:08 +00:00
target-i386 virtio,vhost,pci,e1000 2013-03-04 08:22:41 -06:00
target-lm32 gen-icount.h: Rename gen_icount_start/end to gen_tb_start/end 2013-03-03 14:29:08 +00:00
target-m68k gen-icount.h: Rename gen_icount_start/end to gen_tb_start/end 2013-03-03 14:29:08 +00:00
target-microblaze gen-icount.h: Rename gen_icount_start/end to gen_tb_start/end 2013-03-03 14:29:08 +00:00
target-mips mips64-linux-user: Enable 64-bit address mode and fpu 2013-03-05 11:58:48 +01:00
target-openrisc gen-icount.h: Rename gen_icount_start/end to gen_tb_start/end 2013-03-03 14:29:08 +00:00
target-ppc target-ppc: Change "POWER7" CPU alias 2013-03-08 21:04:52 +01:00
target-s390x gen-icount.h: Rename gen_icount_start/end to gen_tb_start/end 2013-03-03 14:29:08 +00:00
target-sh4 gen-icount.h: Rename gen_icount_start/end to gen_tb_start/end 2013-03-03 14:29:08 +00:00
target-sparc gen-icount.h: Rename gen_icount_start/end to gen_tb_start/end 2013-03-03 14:29:08 +00:00
target-unicore32 gen-icount.h: Rename gen_icount_start/end to gen_tb_start/end 2013-03-03 14:29:08 +00:00
target-xtensa gen-icount.h: Rename gen_icount_start/end to gen_tb_start/end 2013-03-03 14:29:08 +00:00
tcg Handle CPU interrupts by inline checking of a flag 2013-03-03 14:28:47 +00:00
tests target-mips: fix DSP overflow macro and affected routines 2013-03-04 18:15:34 +01:00
trace trace: deal with deprecated glib thread functions 2013-02-12 16:26:44 -06:00
ui Add compat for GDK_KEY_XXX symbols 2013-02-26 13:29:55 -06:00
util oslib-posix: Align to permit transparent hugepages on ARM Linux 2013-03-05 00:34:40 +00:00
.exrc qemu: add .exrc 2012-09-07 09:02:44 +03:00
.gitignore .gitignore: Ignore optionrom/*.asm 2013-02-21 10:38:07 +01:00
.gitmodules pixman: add submodule 2012-11-01 13:10:06 +01:00
.mailmap Add a .mailmap to map pre-git-conversion authors to friendly names 2011-12-12 17:06:21 -06:00
CODING_STYLE Replace Qemu by QEMU in internal documentation 2012-04-07 13:58:25 +00:00
COPYING COPYING: update from FSF 2008-10-12 17:54:42 +00:00
COPYING.LIB Update FSF address in GPL/LGPL boilerplate 2009-01-04 22:05:52 +00:00
Changelog fix some common typos 2012-05-14 07:27:24 +02:00
HACKING HACKING: List areas where we may rely on impdef C behaviour 2012-12-08 14:27:40 +00:00
LICENSE LICENSE: There is no libqemu.a anymore 2011-12-09 11:25:22 +00:00
MAINTAINERS MAINTAINERS: add entry for ARM KVM guest cores 2013-03-05 00:45:43 +00:00
Makefile gtk: add translation support (v5) 2013-02-21 16:34:48 -06:00
Makefile.objs qtest: Add MMIO support 2013-02-18 08:39:10 -06:00
Makefile.target qtest: Add MMIO support 2013-02-18 08:39:10 -06:00
README Update README 2011-12-11 17:50:43 -06:00
VERSION Open up 1.5 development tree 2013-02-15 17:40:56 -06:00
aio-posix.c aio: support G_IO_HUP and G_IO_ERR 2013-02-21 16:17:31 -06:00
aio-win32.c aio: Fix return value of aio_poll() 2013-01-17 10:51:42 +01:00
arch_init.c migration: calculate expected_downtime 2013-02-22 10:12:52 +01:00
async.c aio: convert aio_poll() to g_poll(3) 2013-02-21 16:17:31 -06:00
balloon.c softmmu: move include files to include/sysemu/ 2012-12-19 08:32:45 +01:00
block-migration.c block-migration: fix pending() and iterate() return values 2013-02-12 16:26:44 -06:00
block.c block: for HMP commit() operations on 'all', skip non-COW drives 2013-03-04 09:54:17 +01:00
blockdev-nbd.c softmmu: move include files to include/sysemu/ 2012-12-19 08:32:45 +01:00
blockdev.c blockdev: add discard suboption to -drive 2013-02-22 21:29:42 +01:00
blockjob.c misc: move include files to include/qemu/ 2012-12-19 08:32:39 +01:00
bt-host.c softmmu: move remaining include files to include/ subdirectories 2012-12-19 08:32:46 +01:00
bt-vhci.c softmmu: move remaining include files to include/ subdirectories 2012-12-19 08:32:46 +01:00
cmd.c misc: move include files to include/qemu/ 2012-12-19 08:32:39 +01:00
cmd.h Delete useless 'extern' qualifiers for functions 2011-01-23 16:21:20 +00:00
configure Merge branch 'target-arm.next' of git://git.linaro.org/people/pmaydell/qemu-arm 2013-03-05 15:11:30 +01:00
coroutine-gthread.c block: move include files to include/block/ 2012-12-19 08:31:31 +01:00
coroutine-sigaltstack.c Merge remote-tracking branch 'kwolf/for-anthony' into staging 2013-02-26 07:44:39 -06:00
coroutine-ucontext.c Merge remote-tracking branch 'kwolf/for-anthony' into staging 2013-02-26 07:44:39 -06:00
coroutine-win32.c block: move include files to include/block/ 2012-12-19 08:31:31 +01:00
cpu-exec.c Handle CPU interrupts by inline checking of a flag 2013-03-03 14:28:47 +00:00
cpus.c cpus.c: Drop unnecessary set_cpu_log() 2013-02-16 10:45:19 +00:00
cputlb.c cpu: Move current_tb field to CPUState 2013-02-16 14:51:00 +01:00
device_tree.c softmmu: move include files to include/sysemu/ 2012-12-19 08:32:45 +01:00
disas.c monitor: move include files to include/monitor/ 2012-12-19 08:31:32 +01:00
dma-helpers.c softmmu: move include files to include/sysemu/ 2012-12-19 08:32:45 +01:00
dump-stub.c softmmu: move include files to include/sysemu/ 2012-12-19 08:32:45 +01:00
dump.c cpu: Move host_tid field to CPUState 2013-02-16 14:50:59 +01:00
exec.c Handle CPU interrupts by inline checking of a flag 2013-03-03 14:28:47 +00:00
gdbstub.c move socket_set_nodelay to osdep.c 2013-03-04 09:54:17 +01:00
hmp-commands.hx doc: document -netdev hubport 2013-02-27 16:10:47 +01:00
hmp.c error: Strip trailing '\n' from error string arguments (again) 2013-02-11 08:13:19 -06:00
hmp.h qemu-char: Saner naming of memchar stuff & doc fixes 2013-02-06 16:35:19 -06:00
iohandler.c iohandler: switch to GPollFD 2013-02-21 16:17:31 -06:00
ioport.c exec: move include files to include/exec/ 2012-12-19 08:31:31 +01:00
kvm-all.c cpu: Move exit_request field to CPUState 2013-02-16 14:51:00 +01:00
kvm-stub.c kvm: Pass CPUState to kvm_on_sigbus_vcpu() 2013-01-28 16:57:56 +01:00
main-loop.c main-loop: drop rfds/wfds/xfds for good 2013-02-21 16:17:31 -06:00
memory.c memory: Use non-bitops ctzl 2013-02-16 11:12:13 +00:00
memory_mapping-stub.c softmmu: move include files to include/sysemu/ 2012-12-19 08:32:45 +01:00
memory_mapping.c exec: change RAM list to a TAILQ 2012-12-20 23:08:47 +01:00
migration-exec.c migration: make writes blocking 2012-12-20 23:09:25 +01:00
migration-fd.c migration: make writes blocking 2012-12-20 23:09:25 +01:00
migration-tcp.c migration: make writes blocking 2012-12-20 23:09:25 +01:00
migration-unix.c migration: make writes blocking 2012-12-20 23:09:25 +01:00
migration.c migration: calculate expected_downtime 2013-02-22 10:12:52 +01:00
monitor.c Replace all setjmp()/longjmp() with sigsetjmp()/siglongjmp() 2013-02-23 16:11:19 +00:00
nbd.c misc: move include files to include/qemu/ 2012-12-19 08:32:39 +01:00
os-posix.c softmmu: move include files to include/sysemu/ 2012-12-19 08:32:45 +01:00
os-win32.c softmmu: move include files to include/sysemu/ 2012-12-19 08:32:45 +01:00
page_cache.c migration: move include files to include/migration/ 2012-12-19 08:31:32 +01:00
qapi-schema-test.json qapi: add struct-errors test case to test-qmp-output-visitor 2012-03-27 09:11:00 -03:00
qapi-schema.json qemu-img: add compressed clusters to BlockFragInfo 2013-02-22 21:21:09 +01:00
qdict-test-data.txt Introduce QDict test data file 2009-09-04 09:37:34 -05:00
qemu-bridge-helper.c misc: move include files to include/qemu/ 2012-12-19 08:32:39 +01:00
qemu-char.c move socket_set_nodelay to osdep.c 2013-03-04 09:54:17 +01:00
qemu-coroutine-io.c misc: move include files to include/qemu/ 2012-12-19 08:32:39 +01:00
qemu-coroutine-lock.c misc: move include files to include/qemu/ 2012-12-19 08:32:39 +01:00
qemu-coroutine-sleep.c misc: move include files to include/qemu/ 2012-12-19 08:32:39 +01:00
qemu-coroutine.c coroutine: move pooling to common code 2013-02-22 21:21:10 +01:00
qemu-doc.texi sheepdog: add support for connecting to unix domain socket 2013-03-04 09:54:17 +01:00
qemu-img-cmds.hx qemu-img: Add compare subcommand 2013-02-22 21:21:10 +01:00
qemu-img.c qemu-img: Add compare subcommand 2013-02-22 21:21:10 +01:00
qemu-img.texi qemu-img: Add compare subcommand 2013-02-22 21:21:10 +01:00
qemu-io.c block: implement BDRV_O_UNMAP 2013-02-22 21:29:42 +01:00
qemu-log.c qemu-log: default to stderr for logging output 2013-02-26 13:31:47 -06:00
qemu-nbd.c qemu-nbd: add --discard option 2013-02-22 21:29:43 +01:00
qemu-nbd.texi qemu-nbd: add --discard option 2013-02-22 21:29:43 +01:00
qemu-options-wrapper.h vl.c: In qemu -h output, only print options for the arch we are running as 2011-12-19 10:27:33 -06:00
qemu-options.h vl.c: Move option generation logic into a wrapper file 2011-12-19 10:27:33 -06:00
qemu-options.hx Merge remote-tracking branch 'stefanha/block' into staging 2013-03-04 08:22:48 -06:00
qemu-seccomp.c softmmu: move include files to include/sysemu/ 2012-12-19 08:32:45 +01:00
qemu-tech.texi qemu-tech.texi: update implemented xtensa features list 2012-11-29 13:00:52 -06:00
qemu-timer.c softmmu: move include files to include/sysemu/ 2012-12-19 08:32:45 +01:00
qemu.sasl Add SASL authentication support ("Daniel P. Berrange") 2009-03-06 20:27:28 +00:00
qmp-commands.hx qmp: netdev_add is like -netdev, not -net, fix documentation 2013-02-27 16:10:47 +01:00
qmp.c softmmu: move remaining include files to include/ subdirectories 2012-12-19 08:32:46 +01:00
qtest.c qtest: Add MMIO support 2013-02-18 08:39:10 -06:00
readline.c readline: Fix unchecked strdup() by converting to g_strdup() 2013-01-30 11:14:46 +01:00
rules.mak rules/mak: make clean should blow away timestamp files 2013-01-30 01:31:08 +02:00
savevm.c migration: make qemu_ftell() public and support writable files 2013-02-12 16:26:44 -06:00
spice-qemu-char.c Merge remote-tracking branch 'bonzini/header-dirs' into staging 2012-12-19 17:15:39 -06:00
tcg-runtime.c tcg: Implement multiword multiply helpers 2013-02-23 17:25:28 +00:00
tci.c exec: move include files to include/exec/ 2012-12-19 08:31:31 +01:00
thread-pool.c misc: move include files to include/qemu/ 2012-12-19 08:32:39 +01:00
thunk.c exec: move include files to include/exec/ 2012-12-19 08:31:31 +01:00
trace-events usb-xhci: usb3 streams 2013-02-19 13:17:48 +01:00
translate-all.c translate-all.c: Remove cpu_unlink_tb() 2013-03-03 14:28:59 +00:00
translate-all.h cputlb: Pass CPUState to cpu_unlink_tb() 2013-02-16 14:51:00 +01:00
user-exec.c Replace all setjmp()/longjmp() with sigsetjmp()/siglongjmp() 2013-02-23 16:11:19 +00:00
version.rc mingw: add version information to the executables 2010-09-26 16:07:57 +00:00
vl.c vl.c: allow for repeated -sd arguments 2013-02-28 18:49:19 +00:00
xbzrle.c Move XBZRLE encoding code to a separate file to allow testing 2013-02-01 08:32:20 +01:00
xen-all.c xen: Simplify halting of first CPU 2013-01-15 04:09:14 +01:00
xen-mapcache.c softmmu: move include files to include/sysemu/ 2012-12-19 08:32:45 +01:00
xen-stub.c exec: move include files to include/exec/ 2012-12-19 08:31:31 +01:00

README

Read the documentation in qemu-doc.html or on http://wiki.qemu.org

- QEMU team